2

What I have?

I have a SharePoint 2010 portal in that a site collection has a number of Publishing sites in a hierarchy. I have customized the master page and this is the code to show global navigation menu on the master page:

<SharePoint:AspMenu ID="TopNavigationMenuV4" runat="server" EnableViewState="false"
            DataSourceID="topSiteMap" AccessKey="<%$Resources:wss,navigation_accesskey%>"
            UseSimpleRendering="true" UseSeparateCSS="true" Orientation="Horizontal" StaticDisplayLevels="2"
            MaximumDynamicDisplayLevels="6" DynamicHorizontalOffset="0" SkipLinkText="" CssClass="s4-tn">
</SharePoint:AspMenu>

<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>

And, all sub sites have Display the same navigation items as the parent site option set in the navigation.

What problem am I facing?

On a sub site, when I add a Heading in the Site Navigation Settings, it is not showing in the global navigation. But, sub-sites and pages are displaying properly as sub-menus.

Am I missing anything here?

Thanks in advance!

Update: If I add a link instead of heading, it shows up in the global navigation but, only headings are not showing up.

2
  • Are you adding the heading to the Global Nav or the "Current" Nav (a.k.a quick launch). Also, assuming you are adding the heading in the root site of the site collection? If you add the head to the navigation of a subsite it will only show up when you are in that subsite.
    – Jon Lester
    Oct 3, 2012 at 12:32
  • Actually, Display the same navigation items as the parent site is set and I am trying to add heading on a subsite.
    – Vijay
    Oct 3, 2012 at 14:25

2 Answers 2

1

What you are seeing is how it is supposed to work, assuming you are using drop downs for sub navigation. The headings on the sub site would be treated as a heading within a heading as far as SP is concerned, so you can only display custom links with sub sites navigation.

Now if you have a sub site of a sub site and you change the MaximumDynamicDisplayLevels, which you did, then SP can have a third, fourth and fifth level, but only when it's sub sites of sub sites, not a heading within a heading. Even though as far as you are concerned your sub site's header is a top level heading, it is not in the SP world.

1
  • I'm facing the same as Vijay but on SharePoint 2013. I agree with Eric's answer but can't find any Microsoft article in which this is said. @Eric, do you know the page where this is confirmed?
    – jaloplo
    Dec 7, 2016 at 12:42
0

Based on the information given in the question, try removing the "StartingNodeUrl" attribute from the SiteMapDataSource. It should default to the current node, and you already have ShowStartingNode set to false (so the effect should be to show everything below the current site). Assuming you want all subsites to show the same navigation as the root site, make sure you check that option under site settings > navigation for each of the sub sites.

1
  • Thank you! But, removing StartingNodeUrl did not work and I have set navigation for each sub sites and the subsite hierarchy is showing in the menu properly. But, only the heading and links under it are not showing.
    – Vijay
    Oct 3, 2012 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.