I would like to have breadcrumb that does not display document library name in breadcrumb trail.For example if i use SPContentMapProvider it will create breadcrumb like Home-->Subsite--> docLib-->DocsetTitle so in order to remove docLib i have tried another sitemapProvider called CurrentNavSiteMapProviderNoEncode which remove docLib but dont see docsetTitle either. i would like to see Home-->subsite--->DocsetTitle.

Please advise

Thanks ROnak


You could just do the following in the masterpage or on the page where you would not want to show the document library from the breadcrumb:

[script language="javascript" type="text/javascript"]
var breadCrumbs = document.getElementById
if (breadCrumbs != null)
    if (breadCrumbs.childNodes.length >= 3)
        if (breadCrumbs.childNodes[2].innerHTML.indexOf('Pages') > 0)
            breadCrumbs.childNodes[1].innerHTML = "";
            breadCrumbs.childNodes[2].innerHTML = "";
//Change '"[","]" to "<",">" in script tag.

This was taken from here: http://kadyanmossnuts.blogspot.co.uk/2008/08/hide-document-library-name-like-pages.html

  • Thanks for your reply i can not hardcode pages or some doclib name.i am looking for c# solution. – Ronak Aug 24 '12 at 12:45

Thanks i have used this link as starting point of creating custom control for breadcrumb and its working fine.


Thanks waldek for great information on your blog.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.