discuss.answer
-
- 8 Posts
Collections will work great for this.
Add a TV to the event that has the Time/Date for when the event starts.
Then could use
&tvFilters=`tvEventStartDate`
and
on
to return only the next upcoming event.
Hm. I'd be inclined to use an extended resource object with the start date and the end date built-in, it would be a lot faster and easier to deal with than using TVs. Collections shouldn't have any trouble handling these. To simplify usage, I'd probably create an empty one, unpublished, and just duplicate it whenever I want to add a new one.
http://bobsguides.com/blog.html/2014/06/02/why-extend-modresource/
http://bobsguides.com/classextender-class.html
-
- 74 Posts
Thank you guys for your suggestion. I will try these methods out.
That's not my tutorial, that's Bruno's tutorial. Try posting to the MIGX board
http://forums.modx.com/board/?board=271
-
- 74 Posts
Thanks for the correction Susan and I will try your suggestion.
-
- 5,888 Posts
you will need to call getResources also uncached:
[[!getResources@eventslist?
&tvFilters=`eventstart>>[[!time:date=`%Y-%m-%d %T`]]`
]]
does this work then?