The PortalSiteMapProvider object is the true source of hierarchical navigation data and it provides the data to the PortalSiteMapDataSource object. The PortalSiteMapProvider retrieves nodes from the Windows SharePoint Services 3.0 SPNavigation store. You use the SPNavigation object to create static links and groupings. After you provide static links and groupings, the application merges in dynamic items that represent Web sites and pages with the static links and groupings. Office SharePoint Server 2007 also applies security trimming so that users see only the navigation items to which they have permission to navigate.
Declare named providers in the application’s web.config file to make them widely accessible. Declarations of the two most important PortalSiteMapProvider objects—
CombinedNavSiteMapProvider and CurrentSiteNavSiteMapProvider—are shown in the following code.

<add name=”CombinedNavSiteMapProvider” description=

“MOSS 2007 provider for Combined navigation” Type=”Microsoft.SharePoint.Publishing.
NavigationType=”Combined” EncodeOutput=”true”>
<add name=”CurrentNavSiteMapProvider” description=
“MOSS 2007 provider for Current navigation” Type=
NavigationType=”Current” EncodeOutput=”true”/>
Note : The name of the first provider, CombinedNavSiteMapProvider, matches the value specified for the SiteMapProvider property. This indicates that a Horizontal menu will be created.
The following are the properties,
  1. NavigationType – Gets or sets the type of navigation for this navigation provider. Available options include “Combined”, “Current”, and “Global” and behave as specified by the next three properties: CombinedNavSiteMapProvider, CurrentSiteMapProvider, and CurrentSiteNavSiteMapProviderNoEncode.
  2. CombinedNavSiteMapProvider – Gets the PortalSiteMapProvider object that is attached by default to the global navigation menu.
  3. CurrentSiteNavSiteMapProvider – Gets the PortalSiteMapProvider object that is attached by default to the current navigation menu or the QuickLaunch toolbar.
  4. CurrentSiteNavSiteMapProviderNoEncode – Gets the PortalSiteMapProvider object that is attached by default to the breadcrumb navigation.
    Declare this property almost identically to CurrentSiteNavSiteMapProvider, but exclude the EncodeOutput=”true” attribute.
  5. GlobalNavSiteMapProvider – Gets a PortalSiteMapProvider object with the NavigationType property set to Global.
  6. EncodeOutput – Gets or sets whether to HTML-encode the Title property of any PortalSiteMapNode object returned by the provider.The ASP.NET 2.0 menu control does not automatically HTML-encode the Title property when rendering. However, the ASP.NET 2.0 SiteMapPath control does HTML-encode the Title property.
  7. DynamicChildLimit – Gets or sets the number of dynamic child items to show at each level. Dynamic child items can be subsites (any SPWeb objects) and pages.
  8. RequireUniqueKeysForNodes – Gets or sets whether nodes returned from the provider should each have unique values for their Key properties.
    To enable menu highlighting to work correctly on authored links and headings, set RequireUniqueKeysForNodes=”false”. This does not cause problems when attaching to an ASP.NET 2.0 menu control through a data source, but for most other display controls, declare RequireUniqueKeysForNodes=”true”.
  9. IncludeSubSites – Gets or sets whether this provider returns subsites.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s