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 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" />
    </SharePoint:SPLinkButton>
  </asp:ContentPlaceHolder>
  </span> <span id="onetidPageTitleSeparator" class="s4-nothome s4-bcsep s4-titlesep">
  <SharePoint:ClusteredDirectionalSeparatorArrow runat="server"/>
  </span>
  <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" />
  <div class="s4-pagedescription" tabindex="0" >
    <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server"> </asp:ContentPlaceHolder>
  </div>
</div>
<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server"> </asp:ContentPlaceHolder>
</div>

Is there a better way to do this?

Thanks.

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

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

share|improve this answer
    
Thanks @C.Marius –  jasonflaherty Apr 30 '12 at 20:54
add comment

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

share|improve this answer
add comment

I'm using this code:

<div id="breadcrumbs">
            <asp:SiteMapPath ID="siteMapPath" Runat="server" SiteMapProvider="CurrentNavSiteMapProviderNoEncode" RenderCurrentNodeAsLink="false" PathSeparator=" | "/>
        </div>
share|improve this answer
    
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. –  jasonflaherty Feb 23 '12 at 18:58
add comment

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.