Lack of interest Add some global variables to the template

  • Thread starter Thread starter ragtek
  • Start date Start date
This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.
R

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.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
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'];
        }
    }
 
Top Bottom