0

I am building a SharePoint 2013 portal. I have created a new page and selected the pagelayout searchresult. Thats the perfect pagelayout but I am missing the horizontal navigation bar in the top of my page. So I would like to clone this pagelayout and customize it to show the horizontal navigation bar.

How can I clone this pagelayout?

4 Answers 4

0

If you'd like handle it using CSS approach, add the following to your page layout's PlaceHolderAdditionalPageHead section:

<style type="text/css">
body.focus-on-content #s4-bodyContainer #s4-titlerow {
    display: none !important;
}
#s4-bodyContainer #s4-titlerow {
    display: block !important;
}
<style>

Alternatively, you could add this above CSS to your page (using Script Editor/CEWP) that inherits your Search Page Layout.

3
  • I try to add the css in an CEWP and it works. I only see now 2 logos. Do I need to add some extra css to hide one of the logos.
    – Ola
    Commented May 2, 2014 at 9:40
  • I have add some extra css and now I see only 1 logo. Also the ribbon was hided. I have also add an extra css row to show the ribbon. The reason Why I dont add these css into the OOTB searchresult pagelayout is because I got an error if I customize it. I got this error: Code blocks are not allowed in this file.
    – Ola
    Commented May 2, 2014 at 9:48
  • Remove the code block on the page: techmikael.blogspot.com/2014/07/… Commented Jul 22, 2014 at 9:32
0

If you want the horizontal (gloal) nav bar, you can configure through Site Settings => Navigation settings. However, if you only want it in the layout, you should create a new one based on the Search results layout. Open SPD, Page Layouts, New Page Layouts and copy the Search results html. To get the global nav in there, you should be able to grab it from one of the default master pages. There are also other menu / nav types in the snippet gallery you can copy and paste into your new layout

<!--SPM:<asp:ContentPlaceHolder id="PlaceHolderGlobalNavigation" runat="server" Visible="false"/>-->
<!--SPM:<asp:ContentPlaceHolder id="PlaceHolderGlobalNavigationSiteMap" runat="server" Visible="false"/>-->
1
  • I try to create a new blanco pagelayout. I copied the html from the searchresult pagelayout and paste it in my new blanco pagelayout. I save it and check it in and publish it and approve it. When I create a new page and selected my custom pagelayout I got an error. What did I do wrong?
    – Ola
    Commented May 2, 2014 at 9:38
0

Credits by Aveenav. This is the solution.

 <style type="text/css">
    body.focus-on-content #s4-bodyContainer #s4-titlerow {
        display: none !important;
    }
    #s4-bodyContainer #s4-titlerow {
        display: block !important;
    }

    #searchIcon {
          display: none !important;
    }

    #s4-ribbonrow {
          display: block !important;
    }
 </style>
0

You should remove the code blocks on your copy of the search result page layout, and it should work.

See http://techmikael.blogspot.de/2014/07/custom-search-result-page-layout-in.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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