2

The Enterprise Search Center appears to use the minimal master page, and has no top link navigation. This seems a bit silly and is hard to use if you use the Search Center as a subsite in a larger site collection. How do I add the top link navigation bar to the Search Center?

2
  • Awesome, this worked perfect for me. I want to thank you for this helpful solutions.
    – user10057
    Commented Aug 13, 2012 at 16:43
  • Worked like a charm ! Thanks a lot The Minimal page was already "Set as Custom Master Page" and the v4.master was already " Set as fault Master Page". I don't know why but I'm not complaining :-) Commented Nov 8, 2013 at 8:52

3 Answers 3

5

Credit to KolbyH at the MSDN forums for pointing me in the right direction here. There is some sort of weird master page setup in the Search Center, but you can get around this without too much trouble:

  1. Create the Search Center
  2. Open the Search Center in SharePoint designer, go to Master Pages and open "minimal.master"
  3. Add the following code to the page, right before the div that contains PageHolderTitleBreadcrumb:

_

<!-- Add to minimal.master before the div containing PlaceHolderTitleBreadcrumb to add top navigation to Enterprise Search Center -->
<div class="s4-lp s4-toplinks" style="padding-top:5px; padding-bottom:5px; background-image:url(/_layouts/images/selbg.png); background-repeat:no-repeat;
background-color:#f6f6f6; vertical-align:middle; min-height:25px; border-top:1px solid #e0e0e0;
border-bottom:1px solid #b8babd">
    <asp:ContentPlaceHolder id="PlaceHolderTopNavBar" runat="server">
    <h2 class="ms-hidden" style="width: 14px; height: 14px">
    <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,topnav_pagetitle%>" EncodeMethod="HtmlEncode"/></h2>
            <asp:ContentPlaceHolder id="PlaceHolderHorizontalNav" runat="server">
<SharePoint:AspMenu
  ID="TopNavigationMenuV4"
  Runat="server"
  EnableViewState="false"
  DataSourceID="topSiteMap"
  AccessKey="<%$Resources:wss,navigation_accesskey%>"
  UseSimpleRendering="true"
  UseSeparateCss="false"
  Orientation="Horizontal"
  StaticDisplayLevels="2"
  MaximumDynamicDisplayLevels="1"
  SkipLinkText=""
  CssClass="s4-tn"/>
<SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
    <Template_Controls>
        <asp:SiteMapDataSource
          ShowStartingNode="False"
          SiteMapProvider="SPNavigationProvider"
          id="topSiteMap"
          runat="server"
          StartingNodeUrl="sid:1002"/>
    </Template_Controls>
</SharePoint:DelegateControl>
                        </asp:ContentPlaceHolder>
                </asp:ContentPlaceHolder>
</div>

Save the page and right-click minimal.master -> "Set as Custom Master Page". All pages on your Search Center should now have Top Link Navigation.

You may also have to right-click v4.master and "Set as Default Master Page". For some reason v4.master is the default master page, but the search page layouts use a custom master page.

2
  • Awesome, this worked perfectly for me. Thanks for the post!
    – user7613
    Commented Mar 29, 2012 at 15:37
  • I attempted to do this on O365 SharePoint Search but did not work. Does this not work in SharePoint Search Online?
    – user18867
    Commented Aug 12, 2013 at 18:51
2

This did the job for me: http://blogs.kraftkennedy.com/index.php/2010/08/25/branding-sharepoint-2010-search-centers/

1
  • While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See answer for general guidelines.
    – SPDoctor
    Commented Mar 29, 2012 at 16:19
0

We don't allow changing the masterpage so we solved it by setting an alternate css file for the search center subsite. On the first rule we import the usual css file.

@import url("normalAlternate.css");

Then we added these css rules:

body #s4-titlerow {display: block !important;}
body #titlerow {display: block !important;}
body #s4-ribbonrow {display: block;}
#pageTitle{display:none;}
#sideNavBox { margin-top: 0;}
.ms-breadcrumb-box { height: initial; }

Not the answer you're looking for? Browse other questions tagged or ask your own question.