0

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

0

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
('ctl00_PlaceHolderTitleBreadcrumb_ContentMap')
if (breadCrumbs != null)
{
    if (breadCrumbs.childNodes.length >= 3)
    {
        if (breadCrumbs.childNodes[2].innerHTML.indexOf('Pages') > 0)
        {
            breadCrumbs.childNodes[1].innerHTML = "";
            breadCrumbs.childNodes[2].innerHTML = "";
        }
    }
}
[/script]
//Change '"[","]" to "<",">" in script tag.

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

|improve this answer|||||
  • 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
0

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

http://blog.mastykarz.nl/building-breadcrumbs-sharepoint-2010/

Thanks waldek for great information on your blog.

ROnak

|improve this answer|||||

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.