We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

hooks to process channel entries params

Development and Programming

Dave @ Exp:resso's avatar
Dave @ Exp:resso
465 posts
15 years ago
Dave @ Exp:resso's avatar Dave @ Exp:resso

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

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
15 years ago
Sue Crocker's avatar Sue Crocker

Hi, DaveNZ. Since this is a coding question, moving to the Development forum.

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
15 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

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.

       
Dave @ Exp:resso's avatar
Dave @ Exp:resso
465 posts
15 years ago
Dave @ Exp:resso's avatar Dave @ Exp:resso

Thanks Erik, seems like there really should be a hook in there somewhere - so many modules could use it

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.