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

navbar highlights

Discussion in 'XenForo Development Discussions' started by Slavrix, Apr 16, 2014.

  1. Slavrix

    Slavrix Member

    hi, ive gotten adding tabs to my navbar working using

    http://xenforo.com/community/threads/add-own-navigation-tabs.5265/page-7

    however im not sure how to go about making the tab stay highlighted when its the active tab.

    Code:
    <?php
    class XenForo_myCustoms_myTabs
    {
    
        public static function addNavbarTab(array &$extraTabs, $selectedTabId)
        {
            $extraTabs['irc'] = array(
                'title' => new XenForo_Phrase('myNavBar_irc_title'),
                'href'  => XenForo_Link::buildPublicLink('pages/irc'),
            'selected'  =>  ($selectedTabId == 'irc'),
                'linksTemplate' => 'myNavBar_irc_title',    
                'position'  =>  'middle'
            );
        }
    }
    
    thats my class

    ive made a new listener which works fine also, the tabs all work, its just they dont stay highlighted when i click them
     
    Last edited: Apr 16, 2014

Share This Page