How do i alter the name of a default home page in the breadcrumb in sharepoint 2010?
I'm customizing a team site in SharePoint 2010 and have been tweaking the breadcrumb to include a link back to the root. Now it says "Home > Home" for the main site and all 开发者_高级运维subsites. How do i rename the home page so that it isn't called "Home" in the breadcrumb?
I tried creating a new page and naming it the way i wanted, and it worked until i set it to the home page. SharePoint overrides your title name with home EVERY time. Anybody know a way around this so that i can turn this automatic renaming off? I'm open to hacks.
If jQuery is an option for you then use it. You will need to construct the selector to get to the Home node and replace it with whatever text you need. For example,
Let's assume you have the following HTML for the breadcrumb:
<ul class="breadCrumb">
<li class="breadCrumbNode"><a title="Home" href="">Home</a></li>
<li class="breadCrumbNode"><span class="breadCrumbArrow"> > </span></li>
<li class="breadCrumbNode"><a title="Page1" href="">Page1</a></li>
<li class="breadCrumbNode"><span class="breadCrumbArrow"> > </span></li>
<li class="breadCrumbNode"><span class="breadCrumbCurrentNode">This Page</span></li>
</ul>
Your JavaScript would be:
$(document).ready(function (){
$('.breadCrumbNode>a[title=Home]').text('New Title for Home Page');
});
See the example here (jsfiddle.net)
精彩评论