We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19075
    • 1 Posts
    I’m trying to get "reflect" to only show the last 3 months in the archive.
    But I can’t seem to find any documentation about it.  Now Reflect will show all the months with posts in it.  Only need the last 3 months...  huh

    This is my reflect call at the moment:

    [!Reflect?config=`wordpress` &id=`53`&targetID=`53`&getDocuments=`1`&dittoSnippetParameters=`startID:3` &monthSortDir=`DESC`!]

    So there is no limit at the moment. 
    Any ideas?
      • 12121
      • 22 Posts
      I have noticed that a lot of us are having the same issues with ditto+reflect. I too have a news page with an archive in the sidebar and can not get the items to display correctly when I click on a particular month. Perhaps we could get a step by step tutorial on this to quell the amount of posts going up about the same issue.

      In the mean time can I please get a hand with mine?

      News page left column has this ditto call:
      [!Ditto?startID=`90` &tpl=`dittoCull` &summarize=`all` &truncSplit=`true` &tagMode=`onlyTags` &dateSource=`pub_date` &extenders=`dateFilter` &dateFormat=`%B %d, %Y`!]

      (page 90 is my News page displaying all news articles in it’s folder)

      News page right column has this reflect call:
      [[Reflect?config=`wordpress` &targetID=`90` &id=`myDittoCall` &getDocuments=`1` &dateSource=`pub_date` &dittoSnippetParameters=`startID:90` &monthSortDir=`DESC`]]

      (this call is contained in a chunk)

      Landing page for archives is page 109 with this call:
      [!Ditto?startID=`90` &tpl=`dittoArtpages` &dateSource=`pub_date` &id=`myDittoCall` &dateFormat=`%B %d, %Y` &extenders=`dateFilter`!]


      At this point I am totally confused as to what goes where so i won’t be surprised if I have things twisted. I want to click on a month in the sidebar and go to a page with news articles just from that month.

      I appreciate everyone’s help and the power of MODx and this amazing forum!

      -Corey

        • 36592
        • 970 Posts
        @cDesigner

        First of all, Reflect snippet has a bug when you use it with the parameter &dateSource=`pub_date`.
        -> https://mirror3.cvsdude.com/trac/ditto/codebase/ticket/89

        To avoid this bug, you should set &dittoSnippetParameters=`startID:90|sortBy:pub_date` in the Reflect snippet call.

        Second, why are you using &targetID=`90` in your Reflect call ?
        If your landing page is page 109, it should be &targetID=`109`.
          • 12121
          • 22 Posts
          @tkfm

          You are a life saver!! Thank you very much! It works perfect now!