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

Creating a new tab and friendly url issue.

Discussion in 'XenForo Development Discussions' started by Renari, Mar 14, 2014.

  1. Renari

    Renari Member

    When adding a navtab like so I'm running into an issue if friendly url is off, since the page that it needs to link to in this case would be http://site.com/index.php?home/ instead of http://site.com/home is there a variable to check if friendly url are off in this class and change the href value accordingly?
        public static function addNavTab(array &$extraTabs$selectedTabId)
    $extraTabs['home'] = array(
    'title' => new XenForo_Phrase('addon_home'),
    'href'  => 'home',
    'selected' => ($selectedTabId == 'home'),
    'linksTemplate' => 'addon_subnav',
    'position'  =>  'home'
    Last edited: Mar 14, 2014
  2. Renari

    Renari Member

    Figured it out, you should use the the Xenforo_Link class.
    AndyB likes this.

Share This Page