We’re currently developing several EE modules and was wondering if there is currently a hook that will let you modify/process the parameters in the channel:entries tag, and alter the query it makes? For example, we may want to add an additional parameter to the channel entries tag that allows you to add an additional where clause, which is linked to our module. Additionally, it would be good to be able to modify existing params, so the ‘orderby’ could be linked to a field in one of our module DB tables. Not sure if this is possible technically but would be extremely handy, and save 3rd party developers having to basically replicate the channel:entries tag functionality for many of their tags. I know we can make our own tag to return a piped string of entry IDs and pass it through to channel:entries, but this seems a bit clunky…
Moved to Development and Programming by Moderator
Hey Dave. I don’t believe you’re able to alter the query before it’s processed. The only Channel Entries hook I know of involving query/results is the channel_entries_query_result hook which is the results object - not the query itself.
I’ll peruse the channel module and see if there are any un-documented hooks.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.