Hide the “Pages” Library in the SharePoint Breadcrumb

The SharePoint breadcrumb is a nice feature to have on your pages. However, it doesn’t appear tidy in certain scenarios. For the case below, we’re going to get rid of the "Pages" library link in the breadcrumb of a publishing site.

Normal breadcrumb:

My Portal -> Pages -> Test Page1

Updated breadcrumb:

My Portal -> Test Page1

To do this, simply change the breadcrumb source provider to CurrentNavSiteMapProviderNoEncode.  You have to change this in SiteMapPath tag on the SiteMapProvider attribute.


<asp:SiteMapPath SiteMapProvider="SPContentMapProvider" id="ContentMap" SkipLinkText="" NodeStyle-CssClass="ms-sitemapdirectional" runat="server"/>


<asp:SiteMapPath SiteMapProvider="CurrentNavSiteMapProviderNoEncode" id="ContentMap" SkipLinkText="" NodeStyle-CssClass="ms-sitemapdirectional" runat="server"/>

One gotcha is that when you use CurrentNavSiteMapProviderNoEncode, if you want your page names to show up in the breadcrumb, (instead of being truncated off – for instance, in the case above, your breadcrumb would simply be "My Portal" instead of "My Portal –> Test Page1"), you have to make sure that "Show Pages" is true for the current navigation – even if you don’t want to display pages on the left navigation you have to enable it (assuming you want it to appear in the breadcrumb). However, there is a saving grace, if you enable this setting and you don’t want the pages in the left navigation, you can simply go and hide your pages one by one via the navigation settings.

Thanks to Salman’s Blogs for the original article.  http://blogs.salmanghani.info/?p=592

6 responses to “Hide the “Pages” Library in the SharePoint Breadcrumb

  1. Hello,
    This works perfectly fine just like you said, but its not displaying the folder names of the document library are not coming in the breadcrumb.
    Please advice. Thanks for your time.

  2. The pages library is just a folder, so ultimately, this technique is hiding all folders. I don’t believe there’s a way to just hide the pages library folder and no others (using the technique above). You could probably do this using some client side jQuery, but I haven’t explored exactly how.

  3. Hello. Thanks for this post!

    Currently, I’ve been able to make the [Pages] disappear with this method, however, now it’s also making anything that shows up after the pages disappear within the breadcrumbs as well.

    For Example:

    Looks like:
    The Hub / Americas (no service page link)

    I’m not sure if it matters, but [Americas] is a sub site of The Hub.

    Can you tell me if your breadcrumb solution can make all the pages, except the folder [Pages] show up in the breadcrumbs?

    Thank you!!

  4. where can i find the option to set show pages true for current navigation, i have just started working on sharepoint branding

    1. Nitesh,

      Have you tried simply setting the value to the one seen in “old” in the blog post above? Beyond that you’d have to check the documentation from Microsoft, I’ve never had much of a need to show more than that.

Comments are closed.