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

include css

Discussion in 'XenForo Development Discussions' started by Jake Bunce, Apr 29, 2013.

  1. Jake Bunce

    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.

    Opinions?
     
  2. xf_phantom

    xf_phantom Well-Known Member

    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');
    }
     
    dwdmadmac and luutruong like this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Well yeah, that's what I said. So you agree with my approach.
     

Share This Page