Navbar Linkstemplate

  • Thread starter Thread starter ragtek
  • Start date Start date
R

ragtek

Guest
Hi, i have created a tab with an linktemplate.
PHP:
    static public function addNavbarTab(array &$extraTabs, $selectedTabId)
    {
        $extraTabs['info'] = array(
            'title' => new XenForo_Phrase('ragtek_infopage_navbartitle'),
            'selected' => ($selectedTabId == 'info'),
            'href'   => XenForo_Link::buildPublicLink('info'),
            'linksTemplate' => 'ragtek_infopage_navbar',
        );
    }
}
template
PHP:
<ul class="secondaryContent blockLinksList">
    <li><a href="{xen:link info/impressum}">{xen:phrase ragtek_infopage_impressum}</a></li>
    <li><a href="{xen:link info/privacy}">{xen:phrase ragtek_infopage_privacy}</a></li>
</ul>


How can i set the selected tabs in the linksTemplate?
 
PHP:
<?php
class Ragtek_InfoPage_Route_Prefix_InfoPage implements XenForo_Route_Interface
{
    public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
    {
            return $router->getRouteMatch('Ragtek_InfoPage_ControllerPublic_Info', $routePath, 'info');
    }
}
 
Back
Top Bottom