Forum
Events split-items
I need multiple filters for Events. I don't think this is possible yet, so I was going to try to do it myself using 'split-items' and then iterating. I can't seem to get 'split-items' to output as an array, though. I'm doing this:
$array = perch_events_custom([
'sort'=>'eventDateTime',
'sort-order'=>'DESC',
'template'=>'events/event.html',
'split-items'=>true
]);
echo '<pre>'; print_r($array); echo '</pre>';
But it's just outputting to the page as usual, as if 'split-items' wasn't even there. Then between <pre></pre> there is nothing. Am I doing this wrong?
Shane, There isn't an option to split-items in the events app. I cannot confirm multi-filters is available or not.
Robert
Really? 'split-items' is explicitly stated in the perch_events_custom docs: https://docs.grabaperch.com/addons/events/page-functions/custom/
I'm sorry, I looked at the app itself, and I didn't see the option, but I could be wrong. I will look at the docs next. :(
Sorry Shane. You need to add an additional parameter of true to the function if you want to "return" results to a variable.
$results = perch_events_custom([options],true)