Portal Navigation Properties Feature
Posted by lzandman
Today my colleague Harmjan Greving pointed me to the Portal Navigation Properties Feature. I had never encountered this one before and as it turns out it is surprisingly undocumented by Microsoft.
So what does it do? Well, it’s a feature that comes with MOSS 2007 (unfortunately it isn’t included with WSS 3.0) that enables you to define per-site navigation settings in a declarative way. Until now I always used to write custom API code for this, that I executed from a feature receiver or a custom site provisioning provider.
The Portal Navigation Properties Feature itself is actually very simple. It contains no elements, but is only used to trigger the Microsoft.SharePoint.Publishing.NavigationFeatureHandler feature receiver, which does the real work, based on properties you specify. It is typically used from within a site definition file (ONET.XML), like this:
Using Reflector I found out the following properties can be used with this feature:
|IncludeInCurrentNavigation||True / False|
|InheritGlobalNavigation||True / False|
|InheritCurrentNavigation||True / False|
|ShowSiblings||True / False|
|IncludeSubSites||True / False|
|IncludePages||True / False|
|SortAscending||True / False|
1 Please note the awful spelling error in “AutomaticSortingMathod”. Ofcourse this should have been “AutomaticSortingMethod”, but apparently someone at Microsoft forgot to run the spell checker over his/her code 😉