| Nick Porter's profileNick Porter - SharePoint...BlogLists | Help |
|
8/22/2008 Microsoft Office SharePoint Server 2007 - SiteMapProvidersThe four main site map providers for Microsoft Office SharePoint Server 2007 specified in the web.config file, all inherit from the same type: Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider The main difference between these SiteMapProviders is the 'NavigationType' property.
Every SiteMapProvider uses one of three different NavigationTypes. Global, Combined or Current.
Global = Displays the same navigation as the parent site
Current = Displays only the navigation items below the current site Combined = A combination of both Global and Current navigation Looking in the <Providers> section of the web.config file you will see the four main publishing navigation providers. The name of each provider corresponds to the NavigationType specified: GlobalNavSiteMapProvider
<add name="GlobalNavSiteMapProvider" description="CMS provider for Global navigation"
type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Global" EncodeOutput="true" />
CombinedNavSiteMapProvider
<add name="CombinedNavSiteMapProvider" description="CMS provider for Combined navigation"
type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Combined" EncodeOutput="true" />
CurrentNavSiteMapProvider
<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" />
CurrentNavSiteMapProviderNoEncode
<add name="CurrentNavSiteMapProviderNoEncode" description="CMS provider for Current navigation, no encoding of output"
type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Current" EncodeOutput="false" />
Custom SiteMapProviders
If none of the SiteMapProviders above give you what you want, you can easily create your own custom SiteMapProvider.
Just add another line to the <Providers> section of the web.config file specifying a unique name and the 'NavigationType' you want to use.
For example, if I wanted to create a custom provider which used the 'Combined' NavigationType (like the CombinedNavSiteMapProvider above) but I also wanted to enable security trimming and increase the maximum number of nodes to display from the default of 50 to 100, I would insert the following:
<add name="MyCustomSiteMapProvider" description="A custom SiteMapProvder that enables localization and security trimming" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Combined" EncodeOutput="false" SecurityTrimmingEnabled="True" DynamicChildLimit="100"/>
SPNavigationProvider
The SPNavigationProvider is another provider which can be used for navigation. This provider is generally used for Windows SharePoint Services or MOSS 2007 implementations without the Publishing Feature enabled. The main difference between this provider and the other ones above is that it inherits from: Microsoft.SharePoint.Navigation.SPNavigationProvider and you can't specify a 'NavigationType'
<add name="SPNavigationProvider" type="Microsoft.SharePoint.Navigation.SPNavigationProvider, Microsoft.SharePoint,
Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
Personally, I would stay away from using the SPNavigationProvider within MOSS 2007 unless it was absolutely necessary.
Next Post: Implementing your SiteMapProvider within the PortalSiteMapDataSource TrackbacksWeblogs that reference this entry
|
|
|