Thursday 11 October 2007

Breadcrumb links not working?

Personally I find the breadcrumb a very useful navigation tool, and it usually makes it quite clear to an end point user where the user is currently in terms of navigation (especially when you just want to go one level up).

Seems like some of the default master pages which come with SharePoint have the bread crumb links off by default (e.g. BlueBand.master). There is a very simple solution for getting this working though:

Open the master page in SharePoint Designer. Find the bread crumb code (look for SiteMapPath which is the control which renders the breadcrumb) and find the RenderCurrentNodeAsLink attribute and change it from false to true.

RenderCurrentNodeAsLink="true"

Obviously if you don't find the SiteMapPath in your master page, then you first have to include the whole breadcrumb functionality in you master page ;)

<asp:SiteMapPath ID="siteMapPath" Runat="server" SiteMapProvider="CurrentNavSiteMapProviderNoEncode" RenderCurrentNodeAsLink="true" CurrentNodeStyle-CssClass="breadcrumbCurrent" NodeStyle-CssClass="ms-sitemapdirectional"/>