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

Navbar Linkstemplate

Discussion in 'XenForo Development Discussions' started by ragtek, Nov 9, 2010.

  1. ragtek

    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?
     
  2. Arik

    Arik Well-Known Member

    It's not inheriting what's set for the 'info' Route Prefix?
     
  3. ragtek

    ragtek Guest

    PHP:
    <?php
    class Ragtek_InfoPage_Route_Prefix_InfoPage implements XenForo_Route_Interface
    {
        public function 
    match($routePathZend_Controller_Request_Http $requestXenForo_Router $router)
        {
                return 
    $router->getRouteMatch('Ragtek_InfoPage_ControllerPublic_Info'$routePath'info');
        }
    }
     
    HVNGroups.Net likes this.
  4. ragtek

    ragtek Guest

    looooooool

    ok, i've seen now that there is no function for this:D
    omg shame on me^^
    I thought it would be possible to have selected sub navbar elements, but as i saw here http://xenforo.com/community/members/ it's not possible.
     
    HVNGroups.Net likes this.

Share This Page