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

We're using SharePoint 2010 Standard and have a scenario in which there is a Team Site with Publishing Features enabled. We have a custom Masterpage (a slightly modified version of v4.master - with additional bespoke controls) and custom CSS.

The issue is that in any site other than the top level of a site collection, the Top Navigation control seems to ignore the Navigation settings on content pages.

The custom master page is set as the System Master page as well as the Site Master Page (required for Team site) and all Navigation changes appear perfectly on any pages in the _layouts folder. However, any pages created by users (by default set to a type of 'Wiki Page' - which as far as I know uses the ~14/TEMPLATE/DocumentTemplates/wkpstd.aspx template) don't display the correct navigation.

The Navigation displayed is as follows:

  • Top Level Site Collection (correct): HomeLink [manually created link], Link1, Link2, Link3, Link4
  • Subsite: HomeLink (incorrect, since the settings are set to 'inherit from parent')

All Navigation settings are correct and have been double checked and tested in other environments.

Does anyone have any idea why this may not be working? We've checked for conflicting or overriding PlaceHolders in all the templates which we thought could be being used but can't find anything referencing the standard PlaceHolders we're using (PlaceHolderTopNavBar and PlaceHolderHorizontalNav).

The controls being used to render the menu are the defaults:

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

<asp:SiteMapDataSource ShowStartingNode="False"
SiteMapProvider="GlobalNavSiteMapProvider"
id="topSiteMap" runat="server" />

Thanks in advance

share|improve this question
add comment

2 Answers 2

This is probably a known issue which is my intuitive guess as I have exactly faced the same situation before while creating a consistent navigation thats common across entire farm while all the site collections were team site using publishing features. Back then the thing that made it work was a farm level override which was not a very good approach but we went with it.

We made the exact changes to the topnavbar user control residing in

"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES\TopNavBar.ascx"

to match it with the masterpage topnavbar source code.

share|improve this answer
    
Thank you, Moss Farmer. Unfortunately, I don't think this is a viable approach for us, since there may be numerous other web applications in the farm using that file. –  John Jul 16 '12 at 15:30
    
Can you perhaps replicate this scenario on a pilot/staging environment and then try the solution if possible. –  Arko D Jul 16 '12 at 18:03
add comment
up vote 0 down vote accepted

OK, we finally figured out what was causing the problem.

As a result of enabling the Publishing Feature on the Team Site, the navigation settings change.

In our master page (based on a Team Site v4.master), the top menu control was configured to use a DataSource returning a SiteMapDataSource object. However, since enabling the Publishing feature, we needed to use GlobalNavigation, which is actually a PortalSiteMapProvider, which requires that you generate a PortalSiteMapProvider object as your DataSource for the AspMenu control (if you're using this).

Therefore, we replaced the asp:SiteMapDataSource code above with:

PublishingNavigation:PortalSiteMapDataSource
    StartFromCurrentNode="true"
    ShowStartingNode="false"
    SiteMapProvider="GlobalNavigation"
    id="topSiteMap"
    runat="server"

We are now able to use the navigation as intended.

share|improve this answer
add comment

Your Answer

 
discard

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

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