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

Lack of Interest Add some global variables to the template

Discussion in 'Closed Suggestions' started by ragtek, May 5, 2011.

  1. ragtek

    ragtek Guest

    It would be great if xenforo would register automatic some important variables in all templates.

    At least it would be useful to have the node_id and if you're viewing a thread the thread data.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. ragtek

    ragtek Guest

    It seems that at least $forum was implemented in thread & forum controller
    PHP:
        /**
         * Adds 'forum' to the list of $containerParams if it exists in $params
         */
        
    protected function _postDispatch($controllerResponse$controllerName$action)
        {
            if (isset(
    $controllerResponse->params['forum']))
            {
                
    $controllerResponse->containerParams['forum'] = $controllerResponse->params['forum'];
            }
        }
     

Share This Page