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):
     
    Kaiti, Feb 19, 2018 IP
    kunnusingh likes this.
  2. zuardin

    zuardin Active Member

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

    peeper Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    Admin Cp > Appearance > > templates >navigation

    I can't find the 'navigation' in Templates..
     
    peeper, Feb 19, 2020 IP
  4. Kaiti

    Kaiti Well-Known Member

    Messages:
    136
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    133
    #4
    you can post a screen?
     
    Kaiti, Feb 28, 2020 IP
  5. peeper

    peeper Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #5
    [​IMG]

    I'm using XF2.1 btw.
     
    Last edited: Feb 28, 2020
    peeper, Feb 28, 2020 IP
  6. MaximilianKohler

    MaximilianKohler Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6
    Last edited by a moderator: Jan 6, 2025
    MaximilianKohler, Jan 5, 2025 IP
  7. Kaiti

    Kaiti Well-Known Member

    Messages:
    136
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    133
    #7
    Kaiti, Jan 8, 2025 IP