About Us

Adding a Top-Level Link to a Search Center Breadcrumb in SharePoint 2010

by Jess Collicott 15. May 2012 01:14

In SharePoint 2010, the Search Center does not provide a link back to the top-level site in the breadcrumb. This is a hindrance for users to find their way back to the top-level site.

2012-05-14_1529

Having a link back to the home page of the top-level site would be especially useful in scenarios like Intranet sites. A link could be provided in the breadcrumb back to the Intranet home page. Here is a quick example to add a link to an Intranet home page on a Search Center:

  • Open the root site in the site collection in SharePoint Designer.
  • Click Master Pages in the Site Objects left-navigation.
  • Create a copy of the minimal.master Master Page, and give it an appropriate file name (ie, Intranet_minimal.master). This will be used to create a customized version of the Master Page for the Search Center.
  • Open the new Master Page in SharePoint Designer.
  • Find the following line:

<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitle" CssClass="s4-mini-h1-a">

  • Before that line, add the following to the page:

<!-- Custom Link to Portal -->
<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/" id="rootSiteBreadcrumbLink" CssClass="s4-mini-h1-a">
    Intranet Home
</SharePoint:SPLinkButton>

<SharePoint:ClusteredDirectionalImage
    runat="server"
    ImageUrl="/_layouts/images/fgimg.png"
    LTROffsetX=0
    RTLOffsetX=0
    LTROffsetY=607
    RTLOffsetY=618
    LTRWidth=11
    LTRHeight=11
    RTLWidth=11
    RTLHeight=11
    AlternateText=":"
    ClassName="s4-mini-titlesep"/>
<!-- End Custom Link to Portal –->

  • The specific section of the Master Page should now look like the following:

2012-05-14_1542

  • Save the custom Master Page.
  • Apply the custom Master Page as the default for the Search Center site.
  • If you refresh your Search Center site, you should now see a link to the Intranet Home.

2012-05-14_1544

 

Caveat:

While the link to the top-level site is dynamic (~sitecollection/), this example hard-codes “Intranet Home” in the Search Center Master Page. If the Intranet is renamed, the Master Page would need to be updated to reflect the new name.