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

autogenerate forum list on other templates?

Discussion in 'General XenForo Discussion and Feedback' started by island, Sep 9, 2011.

  1. island

    island Active Member

    I'm thinking of fleshing out some error pages like the xenForo 404 page to provide more things to peak a visitor's interest and maybe decrease bounce.

    Is there an easy way to include a linked list of forums on other pages? (like the list that appears if you hit the bottom arrow? Members obviously know it's there but I'm not sure first-time visitors will know what that is so I'd like to provide a full linked list right front and center on some error pages like the 404)
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. island

    island Active Member

    Thanks. I do see the code in the quick_navigation_menu template but I don't know what it means for it to be a page and am not sure how to get it to execute the forum list in the error template (copying the whole quick_navigation_menu code into the error template as a test reproduced the general items but the forum list is unpopulated/blank on the error page)
  4. ragtek

    ragtek Guest

    The nodes aren't available in the global scope:(

    you'll need to add the nodes
        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(nulltrue);
    $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)

  5. Floris

    Floris Guest

Share This Page