Forum

Thread tagged as: Problem, Events

Events - multiple filters

I can't get multiple filters to work with perch_events_custom. Am I doing something wrong here?

Perch: 2.5.4, PHP: 5.5.3, MySQL: 5.5.33, with PDO Installed apps: content (2.5.4), assets (2.5.4), perch_events (1.9), perch_forms (1.7)

perch_events_custom (array(
             'template' => 'events/listing/custom-listing-day-grid.html',
             'sort'=>'eventDateTime',
             'sort-order'=>'ASC',
             'filter' => array (
                array (
                    'filter' => 'eventDateTime',
                    'match' => 'gte',
                    'value' => date('Y-m-d'),
                    ),
                   array (
                    'filter' => 'publish_on',
                    'match' => 'lte',
                    'value' => date('Y-m-d'),
                    ),
             )
            ));

If multiple filters isn't supported for events, how could I achieve this in another way? The author wants to be able to add events without publishing them immediately. Either one of these solutions would be ok for my client: 1. setting a publishing date in the future (that's what I've been trying), 2. to be able to save the event as a draft

Tim Kinali

Tim Kinali 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Events is very old - it doesn't support multiple filters.

Yes I've noticed numerous things that doesn't work as expected with Events... Are you planning on updating it anytime soon? In the meantime is there any workaround?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, an update is in the works.

A filter on the date should work.