include css

Jake Bunce

Well-known member
I want to include my css template on every frontend page for NodesAsTabs.

I am thinking I will call on XenForo_Template_Abstract::addRequiredExternal() for PAGE_CONTAINER using a template_create listener.

Opinions?
 
No need to do it so complicated;)

Event template create:
PHP:
if ($templateName == 'PAGE_CONTAINER' && $template instanceof XenForo_Template_Public){
$template->addRequiredExternal('css', 'your_csstempmlate.css');
}
 
Back
Top Bottom