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

How do I add a new item in the navigation with a dropdown?

Discussion in 'XenForo Questions and Support' started by Darfuria, Nov 4, 2010.

  1. Darfuria

    Darfuria Active Member

    Can't find this through searching, and can't figure it out through copying code. Just want to add an extra dropdown menu to the navigation...
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I came up with something.

    Admin CP -> Appearance -> Templates -> navigation_visitor_tab

    Add this code:

    Code:
    <!-- custom menu -->
    <li class="navTab Popup PopupControl PopupClosed">
    
    	<a href="#" class="navLink" rel="Menu"><strong>MENU TITLE</strong></a>
    
    	<div class="Menu" id="CustomMenu">
    		<div class="primaryContent menuHeader">
    			YOUR STUFF HERE
    		</div>
    	</div>		
    </li>
    
    ...as shown below:

    Code:
    <xen:edithint template="navigation.css" />
    
    <ul class="visitorTabs">
    
    <!-- custom menu -->
    <li class="navTab Popup PopupControl PopupClosed">
    
    	<a href="#" class="navLink" rel="Menu"><strong>MENU TITLE</strong></a>
    
    	<div class="Menu" id="CustomMenu">
    		<div class="primaryContent menuHeader">
    			YOUR STUFF HERE
    		</div>
    	</div>		
    </li>
    
    	<!-- account -->
    	<li class="navTab account Popup PopupControl PopupClosed {xen:if $tabs.account.selected, 'selected'}">
    	
    		<a href="{xen:link account}" class="navLink accountPopup" rel="Menu"><strong>{$visitor.username}</strong></a>
    		
    		<div class="Menu JsOnly" id="AccountMenu">
    			<div class="primaryContent menuHeader">
    				<xen:avatar user="$visitor" size="m" class="NoOverlay plainImage" title="{xen:phrase view_your_profile}" />
    				
    				<h3><a href="{xen:link members, $visitor}" class="concealed" title="{xen:phrase view_your_profile}">{$visitor.username}</a></h3>
    
    This is the result:

    Screen shot 2010-11-04 at 11.37.06 PM.png

    Hopefully that helps.
     
    nukedi, Sean James, Veer and 2 others like this.
  3. ineedhelp

    ineedhelp Well-Known Member

    How do I add 2 pages to the drop down menu pls?

    I'm not using phases or anything - just as shown as above....

    Should I use css ? If yes, can someone give me the coding pls?
     
  4. ineedhelp

    ineedhelp Well-Known Member

  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Just duplicate the menu code. But you should probably use a different id (id="CustomMenu").
     
    nukedi likes this.

Share This Page