Protiviti / SharePoint Blog

SharePoint Blog

September 26
Breadcrumbs in SharePoint 2013

I have had multiple projects where breadcrumbs have been requested either directly by the client, have been included in comps or both. As I went to research SharePoint breadcrumbs, I figured out that these are not OOTB in SharePoint 2013. I was ready to slide down a potentially slippery slope to try to get these breadcrumbs working. One client not only requested breadcrumbs, but told me that they wanted the current page to be clickable within the breadcrumb as well. They had also given me a disclaimer that in the past they had problems getting this to work and only were able to fix it via custom development.

I did a little digging through StaffComm/Google and found that you could add a tag to the master page which would print breadcrumbs onto the site.

 

The control:

 

<asp:SiteMapPath SiteMapProviders="SPSiteMapProvider,SPXmlContentMapProvider" PathSeparator=" / " RenderCurrentNodeAsLink="true" NodeStyle-CssClass="breadcrumbItem" CurrentNodeStyle-CssClass="breadcrumbItemActive" RootNodeStyle-CssClass="breadcrumbRootNode" HideInteriorRootNodes="true" SkipLinkText="" runat="server" />


  • The Site Map is pulled in with this control, this is default
  • The Path Separator allows you to control how the breadcrumbs are visually divided
  • The RenderCurrentNodeAsLink is exactly what I was looking for. Setting this to “true” allows for the current page to be clickable within the breadcrumb.

 

Example:

Ingraffia Photo.png


These are the 3 main controls I found to be relevant to customizing what I needed. Placing this tag wherever you need it in the master page will print the breadcrumbs and allow for some minor tweaking. It is a simple control to place within the master and allows for standard breadcrumbs that most sites will need.  

 



Quick Launch


© Protiviti 2020. All rights reserved.   |   Privacy Policy