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?
-
Awesome, this worked perfect for me. I want to thank you for this helpful solutions.– user10057Commented 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 :-)– user2965588Commented Nov 8, 2013 at 8:52
3 Answers
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:
- Create the Search Center
- Open the Search Center in SharePoint designer, go to Master Pages and open "minimal.master"
- 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.
-
Awesome, this worked perfectly for me. Thanks for the post!– user7613Commented 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?– user18867Commented Aug 12, 2013 at 18:51
This did the job for me: http://blogs.kraftkennedy.com/index.php/2010/08/25/branding-sharepoint-2010-search-centers/
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; }