FYI, this post is a rant on a MOSS specific component called PortalSiteMapProvider.. ;)
I was asked by a the customer where I’m currently working for if it was possible to display more than 50 items on a fly-out in the global navigation. Being the SharePoint guru that I am, I started googling on how to adjust this.. Quickly I found the DynamicChildLimit property on the PortalSiteMapProvider class in the Microsoft.SharePoint.Publishing.Navigation namespace!
But then I quickly found out that I needed to modify the web.config to set this property?! WHY?!?!
Why did the team decide to put this type of parameters in the web.config? Why not create an application page in the Central Administration where you can view and set all those parameters.. I mean.. it’s not just one parameter like the DynamicChildLimit in the web.config. But, out of the box, there are several properties defined which you can set like:
I can understand that you need to register all the SiteMap providers in the web.config, but I don’t understand why the properties of the providers are set in the web.config. I know it’s a ASP.NET component, but since it’s part of the Microsoft.SharePoint.Publishing.Navigation namespace and they override initialization method I would have figured they would get the parameters from somewhere else..
if (config["DynamicChildLimit"] != null)
this.DynamicChildLimit = int.Parse(config["DynamicChildLimit"]);
If someone knows why it’s implemented like this.. please let me know because I would love to know it! :)
Technorati Tags: SharePoint