• 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
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.



Well-known member
No need to do it so complicated;)

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