Hiding the Root site link from breadcrumb sharepoint

Hiding the Root site link from breadcrumb sharepoint

You might need to hide the "Home" or your "Root Site" from the breadcrumb links if you dont intend your users to go to that link or for whatever reasons.
Well, here is a quick jquery fix for hiding the root site link. You can add this in a content query webart on the page or in your master page.

Firstly, reference the jquery libraries and then add the below code.

$(document).ready(function(){
var rootNode = $("span[id$=siteMapPath] > span:eq(0)");

if (rootNode.attr("class") == "breadcrumbCurrent")
{
rootNode.hide();
}
else
{
rootNode.show();
}
});

0 comments:

Post a Comment

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at sharepointprogrammingblogger@gmail.com .

Copyright (c) 2010 @ myshaepointwork.blogspot.com. All rights are reserved.Do Not Copy.

@ Learning SharePoint.com