I have been using this for breadcrumbs:

<div id="breadcrumbs"> <span name="onetidProjectPropertyTitle">
  <asp:ContentPlaceHolder id="PlaceHolderSiteName" runat="server">
    <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitle">
      <SharePoint:projectproperty Property="Title" runat="server" />
  </span> <span id="onetidPageTitleSeparator" class="s4-nothome s4-bcsep s4-titlesep">
  <SharePoint:ClusteredDirectionalSeparatorArrow runat="server"/>
  <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" />
  <div class="s4-pagedescription" tabindex="0" >
    <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server"> </asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server"> </asp:ContentPlaceHolder>

Is there a better way to do this?

4 Answers 4


There is no direct answer to this as it depends on your final usage. The one you mention seems like the v4.master one -actually there are 2 even there (the PopUp and Horizontal), serving diferent purposes - In-Site navigation (where in hte context of the current spweb you are) and Out-of-Site navigation (small popUp via Folder icon, showing where in the context of your Site Collection - SPSite you are).

Semantically they are the same, but the diference comes from the DataSource (or Provider), or course then you could style it your way, which could make a hell of a difference (e.g. in Publishing Site you need to adapte to something else, or instead of seing a page you would see the name of the file with Pages folder between - such as explained here http://blog.sharepointrx.com/2010/01/10/fixing-sharepoint-breadcrumbs-to-remove-the-pages-node-and-display-the-page-title-instead-of-the-aspx-page-name/)

Good description on Headther Solomon's blog http://www.heathersolomon.com/blog/archive/2008/08/13/SharePoint-Breadcrumbs--Sample-of-differences-chart-of-uses-and.aspx

For more ideas I would point you to these links

Hope it helps, C:\Marius


Better way? No, not really. You have alternative ways of setting up a breadcrumb, but that is in my opinion the best and most accurate breadcrumb, as it displays the exact details for your current location on the website. Other alternatives, like the one Stefano Paterno, works, but they don't give you that same exact location as you might want when you're navigating in lists on subsites, or in the backend.

The closest I've gotten to a similar breadcrumb setup, was by using these 3 SiteMapProviders:

  1. SPXmlContentMapProvider
  2. SPContentMapProvider
  3. CurrentNavSiteMapProvider


Here is mine, which I use in the Master Page of my publishing site. It is pretty close to what I want. There are a few tricks you can do by putting two breadcrumbs one behind the other and then using the class properties to hide certain parts.

This seems like the easiest and most comprehensive way I have found. It does not use any behind-the-scenes code or solutions. Just drop this in your master page.

<div class="bestbreadcrumb">
    <asp:SiteMapPath ID="bestpath" Runat="server" 
    <asp:SiteMapPath ID="bestsubpath" Runat="server" 

This method renders the path of the subsites and only shows the pages library if you are at the root of the libary. When pages are displayed in the breadcrumb, the library is not shown in the breadcrumb.


  • Home: Home (Root)
  • Home: Shared Documents
  • Home: Site Pages Library
  • Home: page in Page Library
  • Home > Site1: page in Page Library
  • Home > Site1: page in Page Library
  • Home > Site1: Calendar
  • Home > Site2 > Subsite: Subsite
  • Home > Site2 > Subsite: Library
  • Home > Site3 > Subsite > Subsite: Home

I'm using this code:

<div id="breadcrumbs">
            <asp:SiteMapPath ID="siteMapPath" Runat="server" SiteMapProvider="CurrentNavSiteMapProviderNoEncode" RenderCurrentNodeAsLink="false" PathSeparator=" | "/>
  • I get some kind of Correlation Error... any thoughts on that? I see another <asp:SiteMapPath ID="siteMapPath1".... in my MasterTemplate. I am not sure how to debug these errors. Feb 23, 2012 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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