We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41049
    • 35 Posts
    I set up articles with migx TV that contains date. Each article contains migxTV with several various dates with time (start dates of an event).
    Now I would like to show all this upcoming events/articles in one page sorted by dates (exluded past dates).

    Can someone please share or explain how this works, I am completly lost here.

    Thanks!
      • 37042
      • 384 Posts
      Hi Dentist
      Did you have any luck with this? I'm trying to do the same with getResources but it occurs to me that MIGX might be better.
        ...
        • 37984
        • 215 Posts
        In your GetImageList call, use the &sort and &where properties.

        [[!getImageList? &tvname=`yourMIGXtv` &tpl=`yourMIGXtpl` &sort=`[{"sortby":"yourdatefield","sortdir":"ASC","sortmode":"datetime"}]` &where=`{"yourdatefield:>":"[[!today]]"}`]]


        The snippet used in &where (titled "today") is outputting the current date and time in the same format as your date (example: 2013-05-11 06:15:00). Here is that snippet:

        print(Date("Y-m-d G:i:s"));
          Jesse Couch
          MODX Aficionado, Front-End Designer & Developer
          http://www.designcouch.com