I’m building a custom plugin tag pair which returns channel entries. Almost everything seems to be working: I set the TMPL->tagparams array to my custom params, instantiate a new Channel(), and return its entries.
I’m searching a “classes” channel where entries have a “weekday” custom field with values like “Monday”, “Tuesday”, etc. In the case, I want to return the first 5 classes on Mondays:
$this->EE->TMPL->tagparams = array(
'channel' => 'classes',
'limit' => '5',
'search:weekday' => '=Monday'
);
$channel = new Channel();
return $channel->entries();However, EE seems to be ignoring the search:weekday param. It’s returning the right channel and enforcing the limit, but it’s returning all results, not just results with “Monday” for their “weekday” custom field. Should search params work in a plugin like this, and if so, how?
(Also posted on EE.stackexchange)
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.