Sunday, October 10, 2010

SharePoint 2010: Top Navigation on Search pages

To add the standard top navigation menu to your search pages you will need to either modify the out of the box (OOB) minimal.master or to create your own master page with the menu in place.

If you are going to modify the OOB file then please make a copy of the original first. Incase something goes wrong.

To add the menu to the minimal.master open up the masterpage. Insert this in a line above <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server" />
<!--Navigation-->
<div class="s4-pr s4-notdlg" id="s4-topheader2">
<asp:ContentPlaceHolder id="PlaceHolderTopNavBar" runat="server">
<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>
<!--End of Navigation-->

No comments:

Post a Comment