Tuesday, January 8, 2013

Display more than 50 items in SharePoint menu



Recently I had a ticket where SahrePoint site owner wanted to add more then 51 sites to the SharePoint and the problem was that 51th site wasn't showed in the Left navigation and Site Setting > Navigation.

After I changed the web.config of the applications everything work, so please post below to resolve the issue.

SharePoint navigation is based on the ASP.NET 2 SiteMap Provider. By default the limit is 50 items per menu.


1. Open web application  web.config in C:\inetpub\wwwroot\wss\VirtualDirectories\<yourwebapp>
2. If you need to change the limit, justadd the DynamicChildLimit attribute to the GlobalNavSiteMapProvider, CombinedNavSiteMapProvider, CurrentNavSiteMapProvider and CurrentNavSiteMapProviderNoEncode nodes and specify the limit e.g. 100:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration>
  ...
  <system.web>
    ...
    <siteMap defaultProvider="CurrentNavSiteMapProvider" enabled="true">
      <providers>
        ...
        <add name="GlobalNavSiteMapProvider" ... DynamicChildLimit="100" />
        <add name="CombinedNavSiteMapProvider" ... DynamicChildLimit="100" />
        <add name="CurrentNavSiteMapProvider" ... DynamicChildLimit="100" />
        <add name="CurrentNavSiteMapProviderNoEncode" ... DynamicChildLimit="100" />
        ...
    </providers>
    </siteMap>
    ...
  </system.web>
  ...
</configuration>

3. Restart iis