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

Hook improvements

Development and Programming

Paul @ Westhouse IT's avatar
Paul @ Westhouse IT
89 posts
13 years ago
Paul @ Westhouse IT's avatar Paul @ Westhouse IT

There’s currently an EE hook called template_fetch_template. Unfortunately this isn’t before the template is actually fetched, but is at the pre-parse stage. To fit with the template_post_parse hook, I’d like this hook to be renamed to template_pre_parse. Then a new hook template_fetch_template can be added at the start of the fetch_template function (libraries/Template.php line 1997 in 2.4.0). That way last minute alterations to the template_group or template can be made.

The reason I ask is this is exactly what I’d need for a project I’m working on. I’ll also be producing a module with an extension that uses this hook.

Could someone on the Reactor project add this? Or is this really something I’ll need to hack the core code to accomplish?

       
Man With A Peg's avatar
Man With A Peg
124 posts
13 years ago
Man With A Peg's avatar Man With A Peg
Could someone on the Reactor project add this? Or is this really something I’ll need to hack the core code to accomplish?

While I may be wrong, the devs have generally been slow to add new hooks. My recommendation would be to work around it if you can, and hack the rest. Unfortunately that also voids any support for the site.

       
Paul @ Westhouse IT's avatar
Paul @ Westhouse IT
89 posts
13 years ago
Paul @ Westhouse IT's avatar Paul @ Westhouse IT

Yes, I just noticed that the Reactor project got a new hook added in the first release after they were officially started.

Having to hack the code will make it more difficult to sell a module, even though it will just be one line of code for the user to add.

       

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.