SharePoint Breadcrumbs are annoying.
Monday, October 6th, 2008I don’t like the default SharePoint breadcrumbs. They annoy me in multiple ways. And I’m not alone in my disdain.
MOSS 2007 has two breadcrumbs that are included on the master page. Not one, but two. The Global Breadcrumb appears in the upper left of a default SharePoint site, and it shows the site levels as a person delves into a site. A very high-level breadcrumb.
The Page Level breadcrumb is also included on the master page, wrapped in a content placeholder. This allows the master page to provide default information, but allowing the pages to replace that default content with it’s own. If on the page level you empty out that content placeholder, you can zero out the Page Level breadcrumbs. Annoying.
Heather Solomon has a great writeup on breadcrumbs (shocker), which is well worth a read. I particularly like the demo image she provides showing the difference between the two main providers you can choose from.
The next challenge with the breadcrumb is the site map provider it uses. There are several available in SharePoint, and two that are used predominantly for WSS and MOSS sites in the breadcrumb. The problem is the WSS one is great for lists and libraries, and the MOSS one is great for publishing pages. But they each are not great for the other.
Breadcrumb with site map provider best for WSS:
<asp:SiteMapPath SiteMapProvider=”SPContentMapProvider“ id=”ContentMap” SkipLinkText=”" NodeStyle-CssClass=”ms-sitemapdirectional” runat=”server”/>Breadcrumb with site map provider best for MOSS (publishing sites):
<asp:SiteMapPath ID=”siteMapPath” Runat=”server” SiteMapProvider=”CurrentNavSiteMapProviderNoEncode“ RenderCurrentNodeAsLink=”false” CurrentNodeStyle-CssClass=”breadcrumbCurrent” NodeStyle-CssClass=”ms-sitemapdirectional”/>The main issue with the WSS site map provider is it will show directories you don’t want it to (mainly the Pages library) in the breadcrumb, and on some pages it will show “.aspx” on the end of the page name. The MOSS site map provider is more graceful, it just doesn’t show the list or library name in the breadcrumb.
There is also a great collection of reference links at the bottom of the post as well.



