1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How To Add A New Tab In The Navbar in Xenforo [tutorial]

Discussion in 'XenForo' started by Kaiti, Feb 19, 2018.

  1. #1
    To do this little trick your going to need to navigate to:

    Admin Cp > Appearance > > templates >navigation

    Add this code (insert an appropriate link and tab label):
    <!-- mytab -->
    <li class="navTab PopupClosed"><a href="[B]LINK HERE[/B]" class="navLink">[B]TAB LABEL HERE[/B]</a></li>
    Code (markup):

    ...as shown below:
    <li><a href="{xen:link 'find-new/threads'}">{xen:phrase whats_new}</a></li>
    </ul>
    </div>
    </li>
    </xen:if>
    
    
    <!-- mytab -->
    <li class="navTab PopupClosed"><a href="LINK HERE" class="navLink">TAB LABEL HERE</a></li>
    
    
    <!-- extra tabs -->
    <xen:if is="{$extraTabs}">
    <xen:foreach loop="$extraTabs" key="$extraTabId" value="$extraTab">
    <xen:if is="{$extraTab.linksTemplate}">
    Code (markup):
    If you wanted to do a link for account upgrades you'd do this:
    <!-- mytab -->
    <li class="navTab PopupClosed"><a href="{xen:link account/upgrades}" class="navLink">{xen:phrase account_upgrades}</a></li>
    Code (markup):

    SEMrush
     
    Kaiti, Feb 19, 2018 IP
    SEMrush
  2. zuardin

    zuardin Greenhorn

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #2
    Thank you, with xf 2.x its more easy now :)
     
    zuardin, Jun 3, 2018 IP