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!
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.
...
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"));