Customize search results by using result types and display templates in SharePoint

Hi folks today we are going to discuss little Display templates in SharePoint Server 2013 as an intro and then in Part II I’ll modify and show you guys the output of my Search page so let’s just jump into the topic.

Display templates in SharePoint

Display templates are templates used in Web Parts that use search technology (referred to in this article as Search Web Parts) to show the results of a query made to the search index.

Display templates control which managed properties are shown in the search results, and how they appear in the Web Part.

Each display template is made of two files: an HTML version of the display template that you can edit in your HTML editor, and a .js file that SharePoint uses.

You can navigate Display Template by below URL just replace yours

E.g.- https://onlysharepoint2013.sharepoint.com/sites/Bhawana/_catalogs/masterpage/Forms/AllItems.aspx

customize sharepoint 2016 search result page using display template

Customize search results by using result types and display templates in SharePoint

Below under Search, you can find two template files that start from Control and Item, again divided into .html and .js. So the search result page when we are looking .html will contain all design related elements like table, divs, panels like that and in .js file all related scripts used in .html.

customize sharepoint 2013 search result page using display template
customize sharepoint online search result page using display template

So if you want to customize your search result page below are the elements and controls we need to take care of. And based on our need we can alter, remove, hide and update. In fact, we have full control over the elements visible on this page. Also, we can restrict the audience by viewing and accessing the search contents.

customize sharepoint search result page using display template
customize search result page using display template

You may like following sharepoint search tutorials:

This SharePoint tutorial, we learned how to customize search results by using result types and display templates in SharePoint Online/2013/2016.

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)

envelope
envelope

Bhawana Rathore

Hello Everyone!! I am Bhawana a SharePoint MVP and having about 8+ years of SharePoint experience as well as in .Net technologies . I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools . Now exploring more in SharePoint 2016 :) Hope here I can contribute and share my knowledge to the fullest. As I believe "There is no wealth like knowledge, and no poverty like ignorance"

>