• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

include css

Jake Bunce

XenForo moderator
Staff member
#1
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?
 

xf_phantom

Well-known member
#2
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');
}