Thursday, January 31, 2013

SharePoint Navigation Limited to 50 Items


There is a limit set in SharePoint by default which only allows fifty links to show up in the navigation. If you add pages and/or subsites beyond the limit of 50, they stop showing up in the navigation.

The right thing to do would be to re-evaluate your SharePoint site structure at this point. Chances are though, that you will need a more immediate work around to get you past this issue in the meantime.

The limit is set in the PortalSiteMapProvider class in SharePoint. Microsoft’s explanation behind this limit is that “Showing a large number of items in the navigation menu is not useful and can have a negative impact on performance”.


The workaround for this issue is to use the DynamicChildLimit in your sharepoint web site’s web.config file to either set a higher limit, or remove the limit all together by setting it to zero. In the sitemap section of the web.config, there is a line that look like this:

<add name="CurrentNavSiteMapProvider" description="CMS provider for Current navigation" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Current" EncodeOutput="true" IncludePages="PerWeb" IncludeHeadings="true" IncludeAuthoredLinks="true" />

That line needs the DynamicChildLimit added to it like this:

<add name="CurrentNavSiteMapProvider" description="CMS provider for Current navigation" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Current" EncodeOutput="true" DynamicChildLimit="0" IncludePages="PerWeb" IncludeHeadings="true" IncludeAuthoredLinks="true" />



Also see http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.aspx