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

Navbar Linkstemplate

R

ragtek

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

ragtek

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