Events App - filter/match based on end date
I am currently using the Events app to display... events. Because multi-day events are a possibility for this project (as in, events that start on one day and finish a few days later), I've added a new field to the template,
I'm currently using
perch_events_custom to display a list of upcoming events. Like so:
<?php perch_events_custom(array( 'template' => 'listing/event-sidebar.html', 'filter'=>'eventDateTime', 'match'=>'gte', 'value'=>date('Y-m-d'), 'sort'=>'eventDateTime', 'sort-order'=>'ASC', 'count' => 3, )); ?>
This works great, except on the multi-day events: once the start date has passed, the event is no longer displayed (which is what I'd expect with the above code). What I'd like to do is continue to display the events if they are "in progress", and stop displaying the events only after the end date has expired.
<?php perch_events_custom(array( 'template' => 'listing/event-sidebar.html', 'filter'=>'eventEndDateTime', 'match'=>'gte', 'value'=>date('Y-m-d'), 'sort'=>'eventEndDateTime', 'sort-order'=>'ASC', 'count' => 3, )); ?>
However, this new markup doesn't give the desired result (which is to say, nothing "matches" therefore nothing is output to the page). I assume it's to do with the
value line - perhaps the
date variable is baked-in to the Events app itself, and directly tied to
I wonder if the solution lies somewhere in Passing a Variable... somewhere, but to be honest I can't quite wrap my head around this one.
Any help would be greatly appreciated!