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

external links in navigation bar

Discussion in 'Styling and Customization Questions' started by Mr Lucky, Nov 13, 2013.

  1. Mr Lucky

    Mr Lucky Well-Known Member

    Can I add external links to navigation bar?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, edit the navigation template.
     
  3. Mr Lucky

    Mr Lucky Well-Known Member

    OK, but where? presumably I add
    HTML:
    <li>...My LINK...</li>
    somewhere
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    Do you want it as a tab or as a sub-link? Or with the visitor tabs? Without more specificity we can't specify where to put anything.
     
  5. Mr Lucky

    Mr Lucky Well-Known Member

    Just as a tab, like "members" and just to the right of Members. Thanks
     
  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    Edit the template and find this:
    Code:
                <li class="navTab members {xen:if $tabs.members.selected, 'selected', 'Popup PopupControl PopupClosed'}">
              
                    <a href="{$tabs.members.href}" class="navLink">{$tabs.members.title}</a>
                    <a href="{$tabs.members.href}" class="SplitCtrl" rel="Menu"></a>
                  
                    <div class="{xen:if {$tabs.members.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} membersTabLinks">
                        <div class="primaryContent menuHeader">
                            <h3>{$tabs.members.title}</h3>
                            <div class="muted">{xen:phrase quick_links}</div>
                        </div>
                        <ul class="secondaryContent blockLinksList">
                        <xen:hook name="navigation_tabs_members">
                            <li><a href="{xen:link members}">{xen:phrase notable_members}</a></li>
                            <xen:if is="{$xenOptions.enableMemberList}"><li><a href="{xen:link members/list}">{xen:phrase registered_members}</a></li></xen:if>
                            <li><a href="{xen:link online}">{xen:phrase current_visitors}</a></li>
                            <xen:if is="{$xenOptions.enableNewsFeed}"><li><a href="{xen:link recent-activity}">{xen:phrase recent_activity}</a></li></xen:if>
                        </xen:hook>
                        </ul>
                    </div>
                </li>
    
    After that you can add your own:
    Code:
                <li class="navTab uniqueIDentifier">         
                    <a href="{$tabs.members.href}" class="navLink">{$tabs.members.title}</a>
                 </li>
    
     
    Mr Lucky likes this.
  7. Mr Lucky

    Mr Lucky Well-Known Member

    Thank you.
     
  8. Steven Washer

    Steven Washer Member

    I'd like to do that as well, but am not a coder. Does that code come after the very last piece of text on that page?
     
  9. Markos

    Markos Well-Known Member

    What if i just want to add one link to register page visible only to guests? @Brogan @Jake Bunce
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

  11. Markos

    Markos Well-Known Member

    I know this, but i can simply add a link to register page or i have to create extra code? I'm not a coder and i don't want to make mistakes, so i ask. :D
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    You will need to edit the template and add the relevant code.
     
    Markos likes this.

Share This Page