
Hiding and Customizing
PageBreadcrumbs
Steve Mann
Using CSS modications you can easily hide page breadcrumbs; however, this is usually across
all sites and pages. There are times when you want to hide only the breadcrumbs on certain
pages or show a different navigation within the breadcrumb links. You may easily accomplish
this by adding a Content Editor web part to the page that contains JavaScript code.
You need to check the Hidden property so that users do not see the actual web part. To hide
the breadcrumbs, using the Source Editor from the Web Part Properties Pane, add the following
JavaScript to the Content Editor Source:
<script language=javascript>
document.getElementById(‘PlaceHolderTitleBreadCrumb’).innerHTML = “”;
</script>
JQuery is also a popular method of modifying the SharePoint UI. You may accomplish the
same result of hiding the breadcrumbs using the following JQuery script:
<SCRIPT type=text/javascript>
$(document).ready(function(){
var brdCrumb = $(‘.breadcrumbRootNode’).parent();
brdCrumb.hide();
brdCrumb.next().hide();
});
</SCRIPT>
You may use similar code to modify the breadcrumb links. A scenario for this may be as fol-
lows. There are department sites within the main (root) site collection; however, you may
have department news contained in other site collections under a separate managed path (for
C
105054bapp03.indd 405 1/10/12 4:01 PM