SharePoint SiteMapProvider - Help
I have a sharepoint portal with a root site and 3 subsites, to implement the horizontal menu of the portal i use the GlobalNavSiteMapProvider. For the breadcrumb i chose to use the CurrentNavSiteMapProviderNoEncode. In the subsites navegation, i select the options "Show Pages" (if i dont check this op开发者_Go百科tions the breacrumb did not show the correct path for the subsites pages) and "Show the same navegation of main site". The breacrumb works weel for all pages but the menu in welcome pages of subsites instead of showing the global navigation of the root site shows the pages that were created in it (in subsite pages the menu works fine and show the global navegation). If i uncheck the "Show Pages" in subsite navegation, the menu works well in all pages but the bredcrumb only works well on the pages of the root site
What I have done in the past is to define a new navigation provider in the web.config that is dedicated especially for the breadcrumb.
<add name="BreadCrumbSiteMapProvider"
description="CMS provider for Breadcrumb navigation"
type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider,
Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c"
NavigationType="Combined"
EncodeOutput="false"
IncludePages="Always"
IncludeHeadings="true"
IncludeAuthoredLinks="true" />
Add this to the siteMap/providers section of your web.config, and point your breadcrumb control to the new provider
The attribute IncludePages="Always" will override the setting that you have for the checkbox "Show Pages".
精彩评论