Arty
Well-known member
I'm trying to append css at the end of xenforo.css template. I've created event listener for it and put this simple code for test:
For some reason hook for "xenforo_css_extra" never gets called.
Hook for "body" does work correctly, so event listener is working. I'm testing it with default style that has <xen:hook name="xenforo_css_extra" /> at last line of xenforo.css
Code:
public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
{
switch($hookName)
{
case 'xenforo_css_extra':
$contents .= 'test { whatever } ';
break;
case 'body':
$contents .= 'This is a test!';
break;
}
}
Hook for "body" does work correctly, so event listener is working. I'm testing it with default style that has <xen:hook name="xenforo_css_extra" /> at last line of xenforo.css