Jaxel
Well-known member
I'm trying to set up a template_create listener... template_create
Basically, whenever a specific template is called, I want to attach an additional template immediately afterwards. If there was a hook, I could attach it to the $contents; but since its not a hook, and there is no $contents, I dont know how to attach it.Called whenever the template object constructor is called. You may use this event to modify the name of the template being called, to modify the params being passed to the template, or to pre-load additional templates as needed.
Code:
public static function template_create($templateName, array &$params, XenForo_Template_Abstract $template)
{
switch ($templateName)
{
case 'node_category_level_2':
case 'node_forum_level_2':
case 'node_link_level_2':
case 'node_page_level_2':
}
}