Remove Pages from Breadcrumb

Today, I was doing some branding for Publishing site, which is migrated from PHP/HTML using custom code.

When I enabled the breadcrumb on pages (obviously we used our own custom page layouts), the “pages” and “.aspx” in the filename is kind of annoying. Initially I thought of removing this by adding javascript/jquery on page.

But I keep thinking that, it shouldn’t be the best way to do this.

Then I found that changing SiteMapProvider property for Bread Crumb in Master Page from “SPContentMapProvider” to “CurrentNavSiteMapProviderNoEncode”, did the magic.

Now My Sitemap looks like below:

5 comments to Remove Pages from Breadcrumb

  • Rahul Babar

    Hi Udayakumar,

    I am doing the same thing on my sharepoint publishing portal but it still does not work for me. Am I missing something?

    Thanks,
    Rahul Babar

  • What change do you see in breadcrumb after update?

  • Rahul Babar

    Thanks for the quick response.

    Actually I was missing to change sitemappath control in layout pages. I was doing it only in master page.

    Using “SPContentMapProvider”, I get the breadcrumb as

    My Portal > Finance and Corporate Services > Information Technology > Pages > Home.aspx

    After changing it to “CurrentNavSiteMapProviderNoEncode”, breadcrumb becomes

    My Portal > Finance and Corporate Services > Information Technology

    But the requirement is to have breadcrumb like the following.

    My Portal > Finance and Corporate Services > Information Technology > Home

    The same kind of breadcrumb comes in pages like AllItems.aspx of list/library.

    Can we achieve this by some workaround? I appreciate your suggestions.

    Thanks,
    Rahul Babar

  • Martin

    Thanks a lot! You made my day 🙂

  • I adore your wordpress theme, exactly where do you get a hold of it from?

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>