We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18108
    • 24 Posts
    Hi all.
    I am new with Modx and not a php expert, but loving it (Modx). I have managed to get my documents listed with ditto and reflect but, my entries are events. For instance, what happened and what is going to happen. Future and past events.
    Is it possible to split my entries into forthcoming events (those with dates that are coming up) and old events below – with all past events automatically archiving there? How can I do that? Do I need to setup template variable? Could you please help me?
    Thank you in advance.

    Mamu

    Edited:

    I managed to do this by adding a new ditto call using &showPublishedOnly=`0` + &filter=`published,0`.

    So now I have

    Events:
    List of events
    Pagination

    Older events:
    List of older events
    Pagination

    Is that the correct way to do it?
    Thank you.
    I love Modx. smiley
      Thank you for Modx, and thank you for your help.
      • 10449
      • 956 Posts
      Correct? Maybe, but I think using phx or Ditto filtering would be more elegant smiley

      http://ditto.modxcms.com/tutorials/basic_filtering.html
      http://wiki.modxcms.com/index.php/PHx