Table of contents web part remove max 50 limit

We use the "Table of contents" web part on SharePoint landing pages to give access to users to easily navigate to the sites/pages. But, there is a default limitation on the display items in left navigation or table of web part contents  in sharepoint. By default it shows only 50. If you have more than 50 items [either  sub sites or pages] in a site then it will not show up. To increase the limit or to remove limit, please do below changes.
  1. Go to the web.config of the SharePoint site through file system. Usually, it is located at "C:\inetpub\wwwroot\wss\virtualdirectories\port number".
  2.  Please take the back up of the web.config file before do any changes.
  3. Find the below tags in the web.config file.
    <add name="GlobalNavSiteMapProvider" description="CMS provider for Global navigation" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=13.0.0.0, Culture=neutral, PublicKeyToken=94de0004b6e3fcc5" NavigationType="Global" EncodeOutput="true" />
    <add name="CombinedNavSiteMapProvider" description="CMS provider for Combined navigation" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=13.0.0.0, Culture=neutral, PublicKeyToken=94de0004b6e3fcc5" NavigationType="Combined" EncodeOutput="true" />
    <add name="CurrentNavSiteMapProvider" description="CMS provider for Current navigation" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=13.0.0.0, Culture=neutral, PublicKeyToken=94de0004b6e3fcc5" NavigationType="Current" EncodeOutput="true" />
    <add name="CurrentNavSiteMapProviderNoEncode" description="CMS provider for Current navigation, no encoding of output" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=13.0.0.0, Culture=neutral, PublicKeyToken=94de0004b6e3fcc5" NavigationType="Current" EncodeOutput="false" />
  4. All the above tags are belongs to the navigation providers. They are the sources for the navigation controls. We can add any attributes which it recognizes to control the navigation.
  5. Now, according to our problem, we have to add an attribute which can control the number of items to display in navigation. The attribute is, "DynamicChildLimit".  Which accepts integer value. You can give any value in there to control navigation items. For example, if you give 20, then it will show you the top 20 items sorted by created. If you give 0, then it means no limit. Display how many items it has. 
  6. So, we have to add the attribute to all the above tags, so that it should looks like below.
    <add name="GlobalNavSiteMapProvider" description="CMS provider for Global navigation" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=13.0.0.0, Culture=neutral, PublicKeyToken=94de0004b6e3fcc5" NavigationType="Global" EncodeOutput="true" DynamicChildLimit="0" />
    <add name="CombinedNavSiteMapProvider" description="CMS provider for Combined navigation" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=13.0.0.0, Culture=neutral, PublicKeyToken=94de0004b6e3fcc5" NavigationType="Combined" EncodeOutput="true" DynamicChildLimit="0" />
    <add name="CurrentNavSiteMapProvider" description="CMS provider for Current navigation" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=13.0.0.0, Culture=neutral, PublicKeyToken=94de0004b6e3fcc5" NavigationType="Current" EncodeOutput="true" DynamicChildLimit="0" />
    <add name="CurrentNavSiteMapProviderNoEncode" description="CMS provider for Current navigation, no encoding of output" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=13.0.0.0, Culture=neutral, PublicKeyToken=94de0004b6e3fcc5" NavigationType="Current" EncodeOutput="false" DynamicChildLimit="0" />
Note: For removing the limit, I have used 0 in the above example. Please use the number according to your requirements.

Once you have changed the web.config file, save it and check the site. It should display the navigation items according to the setting you have given. Hope it helped.

0 komentar:

Post a Comment

Related Posts with Thumbnails
GiF Pictures, Images and Photos