Listing previous/run-up events
For a given event, I want to display the five directly previous events — *not* relative to the current date, but relative to the given event. Is this possible using native tags?
For a given event, I want to display the five directly previous events — *not* relative to the current date, but relative to the given event. Is this possible using native tags?
Replies
Low 1 Mar 2014 10:17
It might be possible using an embed. Pass through the start date and entry ID of the given event, and use that as the date="" and entry_id="" param (using entry_id="not {embed:entry_id}" to exclude the given event). So it might require some fiddling.
Michael 1 Mar 2014 15:27
That's what I'm doing currently... but then all events on the same day as my given event are also displayed, whether or not they occur before or after the given event.
Low 2 Mar 2014 10:23
So, what if you add this to the given event (single event):
...where {event_dates:start_date} is the start date of the given event. Then the events/prev template could contain this:
Does that help?
Michael 5 Mar 2014 20:39
Ah ha!
unit="passed" is the ticket. Not sure how I missed that in the docs.
Thanks!