• 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

R

ragtek

Guest
#1
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.
 
R

ragtek

Guest
#3
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'];
        }
    }