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?
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.