0

I am developing a custom design in SharePoint 2013 oslo master page. I have successfully designed with top navigation and content part. And I need to place it's default search box into header section(center in header). But I can't figure out how to do that. Any help would be appreciated. Thanks.

1

You can do this using Snippets in SharePoint 2013.

After you convert a master page or create a page layout, you have an HTML version of that page. With the Snippet Gallery, you can quickly add specific SharePoint functionality, such as search or navigation or device channel panels, to the HTML file associated with your master page or page layout.

To do this, perform following steps.

  1. Go to Site Settings --> Design Manager --> Edit Master Page --> Click on your Master Page.
  2. Your Master Page will open in preview Mode. Click on Snippets in the upper right section on the page, which will open Snippet Gallery.
  3. Now in the ribbon (Design tab), select Search Box. You able to see Search Box webpart with section to update its properties and HTML Snippet Section where HTML of the web part is shown.
  4. Copy / Paste HTML Snippet in your master page in the particular section of the master page(e.g. Header).
  5. Save and Publish your master page. You will be able to see the Search Box web part in the Header of your master page.

For more info on this, please refer this MSDN article.

  • I copied the snipped but i couldn't find where to put into my code of HTML master page. I can't find banner section which is called suiteBarLeft section which i found while inspect, but not found that in HTML page. – Sunil Shrestha Apr 19 '17 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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