Marcus
Well-known member
Currently I fetch the current node and all parent nodes with
<div style="display:none"><xen:include template="breadcrumb"></xen:include></div>
I modify this template to give me the right output for this include, and the regular output if it is called not from my template. This is not perfect. Is there another possibility of getting both the a) actual node list and b) all nodes? Thanks.
<div style="display:none"><xen:include template="breadcrumb"></xen:include></div>
I modify this template to give me the right output for this include, and the regular output if it is called not from my template. This is not perfect. Is there another possibility of getting both the a) actual node list and b) all nodes? Thanks.
The nodes aren't available in the global scope
you'll need to add the nodes
PHP:public function actionQuickNavigationMenu() { $route = $this->_input->filterSingle('route', XenForo_Input::STRING); /* @var $nodeModel XenForo_Model_Node */ $nodeModel = $this->getModelFromCache('XenForo_Model_Node'); $nodes = $nodeModel->getViewableNodeList(null, true); $nodeTypes = $nodeModel->getAllNodeTypes(); $quickNavMenuNodeTypes = XenForo_Application::get('options')->quickNavMenuNodeTypes; if (!isset($nodeTypes['_all']) && !in_array('_all', $quickNavMenuNodeTypes)) { $nodes = $nodeModel->filterNodeTypesInTree($nodes, $quickNavMenuNodeTypes); } $nodes = $nodeModel->filterOrphanNodes($nodes); $selected = preg_replace('/[^a-z0-9_-]/i', '', $this->_input->filterSingle('selected', XenForo_Input::STRING)); $options = XenForo_Application::get('options'); $viewParams = array( 'route' => $route, 'nodes' => $nodes, 'nodeTypes' => $nodeTypes, 'selected' => $selected, 'homeLink' => ($options->homePageUrl ? $options->homePageUrl : false) ); return $this->responseView('XenForo_ViewPublic_Misc_QuickNavigationMenu', 'quick_navigation_menu', $viewParams); }