Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm using SharePoint 2010 and all I am trying to do is be able to display my default page's title in the breadcrumb. All other pages work except the default page. Could there be any reason for this?

Here is the line of code I am using in my master page:

<asp:SiteMapPath ID="siteMapPath" Runat="server" SiteMapProvider="CurrentNavSiteMapProviderNoEncode" RenderCurrentNodeAsLink="false" SkipLinkText="" NodeStyle-CssClass="ms-sitemapdirectional"/>
share|improve this question

1 Answer 1

I haven't tested this myself, but this blog, indicates how to accomplish this.

This involves making changes to your SiteMapPath, PlaceHolderTitleBreadcrumb on your master page, and overwriting the content placeholder for the PlaceHolderTitleBreadcrumb on the page layouts.

Snippet (from blog):

Even if in SharePoint 2010 we have the new and cool popup breadcrumb that shows the sites on actual levels (separate lines) the need for a down-to-earth normal breadcrumb still exists.

How do we achieve it? First of all, we add the placeholder for the breadcrumb on the master page:

<asp:ContentPlaceHolder id=”PlaceHolderTitleBreadcrumb2″ runat=”server”> 
<asp:SiteMapPath SiteMapProvider=”CombinedNavSiteMapProvider” id=”ContentMap2″ runat=”server” RenderCurrentNodeAsLink=”true” NodeStyle-CssClass=”ms-sitemapdirectional”/>  </asp:ContentPlaceHolder>

You can experiment with the available site map providers. In my case the CombinedNavSiteMapProvider did the best job. The options are (obviously, not all can be used everywhere):

SPNavigationProvider SPSiteMapProvider SPContentMapProvider SPXmlContentMapProvider ExtendedSearchXmlContentMapProvider AdministrationQuickLaunchProvider SharedServicesQuickLaunchProvider PWASiteMapProvider GlobalNavSiteMapProvider CombinedNavSiteMapProvider CurrentNavSiteMapProvider CurrentNavSiteMapProviderNoEncode GlobalNavigation CurrentNavigation SiteDirectoryCategoryProvider MySiteMapProvider MySiteLeftNavProvider MySiteSubNavProvider

I also wanted to concatenate this with the page level breadcrumb. This breadcrumb (or just page title in the case of pages) is heberated by the PlaceHolderTitleInArea place holder. So the content becomes:

<asp:ContentPlaceHolder id=”PlaceHolderTitleBreadcrumb2″ runat=”server”> 
<asp:SiteMapPath SiteMapProvider=”CombinedNavSiteMapProvider” id=”ContentMap2″ runat=”server” RenderCurrentNodeAsLink=”true” NodeStyle-CssClass=”ms-sitemapdirectional”/> 
<span lang=”en-us” >&nbsp;&gt;</span> <asp:ContentPlaceHolder id=”PlaceHolderPageTitleInTitleArea” runat=”server”/> </asp:ContentPlaceHolder>

However, this will not work on your page layouts, so in there you have to override the whole content place holder with:

<asp:Content ContentPlaceHolderID=”PlaceHolderTitleBreadcrumb2″ runat=”server” >    <asp:SiteMapPath SiteMapProvider=”CurrentNavSiteMapProviderNoEncode” id=”ContentMap2″ runat=”server” RenderCurrentNodeAsLink=”true” NodeStyle-CssClass=”ms-sitemapdirectional” /><span lang=”en-us”>&nbsp;&gt;</span> 
<SharePointWebControls:FieldValue id=”PageTitle” FieldName=”Title” runat=”server”/>
</asp:Content>

And here the CurrentNavSiteMapProviderNoEncode provider is mandatory.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.