Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have the following code to display the sub sites in the top global navigation as a multi-level drop down menu:

<div id="s4-topheader2" class="s4-pr s4-notdlg">
   <a name="startNavigation"></a>
   <div id="s4-searcharea" class="s4-search s4-rp">
      <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
         <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" Version="4"/>
      </asp:ContentPlaceHolder>
      <span class="s4-help">
      <span style="height: 17px; width: 17px; position: relative; display: inline-block; overflow: hidden;" class="s4-clust">
      <a href="#" style="height: 17px; width: 17px; display: inline-block;" onclick="TopHelpButtonClick('HelpHome');return false" accesskey="<%$Resources:wss,multipages_helplink_accesskey%>" id="TopHelpLink" title="<%$Resources:wss,multipages_helplinkalt_text%>" runat="server">
      <img src="/_layouts/images/fgimg.png" alt="<%$Resources:wss,multipages_helplinkalt_text%>" style="left: -0px !important; top: -309px !important; position: absolute;" align="absmiddle" border="0" runat="server" /></a></span>
      </span>
   </div>
   <div class="s4-rp s4-app"></div>
   <div class="s4-lp s4-toplinks">
      <asp:ContentPlaceHolder id="PlaceHolderTopNavBar" runat="server">
         <h2 class="ms-hidden">
            <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,topnav_pagetitle%>" EncodeMethod="HtmlEncode"/>
         </h2>
         <asp:ContentPlaceHolder id="PlaceHolderHorizontalNav" runat="server">
            <SharePoint:AspMenu
               ID="TopNavigationMenuV4"
               Runat="server"
               EnableViewState="false"
               DataSourceID="topSiteMap"
               AccessKey="<%$Resources:wss,navigation_accesskey%>"
               UseSimpleRendering="true"
               UseSeparateCss="false"
               Orientation="Horizontal"
               StaticDisplayLevels="2"
               MaximumDynamicDisplayLevels="11"
               SkipLinkText=""
               CssClass="s4-tn"/>
            <SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
               <Template_Controls>
                  <asp:SiteMapDataSource
                     ShowStartingNode="False"
                     SiteMapProvider="SPNavigationProvider"
                     id="topSiteMap"
                     runat="server"
                     StartingNodeUrl="sid:1002"/>
               </Template_Controls>
            </SharePoint:DelegateControl>
         </asp:ContentPlaceHolder>
      </asp:ContentPlaceHolder>
   </div>
</div>

It works fine, except for two problems. 1. The sub sites are not in alphabetical order. 2. I am unsure how to add this drop down menu to a subsite which has it's navigation set as "Display the navigation items below the current site". I know I am not inheriting the navigation; I just want a particular subsite to have the drop down feature in the global navigation.

I am on SharePoint 2010 Standard.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.