Contents
Display templates in SharePoint 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.
Create Display Template
- Open SharePoint publishing site we created.
- Go to Site Action -> Site Action.
- Click “Master pages and page layouts” under Web Design Galleries.
- Click Display Templates in master page gallery.
- Different types of display templates are visible.
- The existing search display template will open.
What are the different display templates available in Content Search Web Part?
For our Contoso site, we have four display templates:
- One control display template for our category page.
- One item display template for our category page.
- One control display template for our catalog item page.
- One item display template for our catalog item page.
How do I add a template to SharePoint?
In SharePoint Server, on the ribbon, select the Library tab, then select Library Settings. , and then select Library settings. Under General Settings, select Advanced settings. In the Document Template section, under the Template URL field, select Edit Template.
Importing a SharePoint Template (STP) file
- Log in to the SharePoint site.
- Click the Site Actions menu.
- Click Site Settings.
- Click List templates under Galleries.
- Click the Documents tab.
- Click Upload Document.
- Browse to the . stp file and Upload it.
- Click the Site Actions menu.
And when you have found what you are looking for and are ready to display the results on a page, you can use what SharePoint calls Display Templates to show them how you want. Essentially Display Templates are just that, templates of design that are reusable and will work with any type of results you get out of SharePoint search.
Where do I find display templates for my website?
Go to Site Action -> Site Action. Click “Master pages and page layouts” under Web Design Galleries. Click Display Templates in master page gallery. Different types of display templates are visible. Click type of display template, which we want to create. In this example, we are going to create search display template.
What can I do with SharePoint search template?
With SharePoint Search anything is possible, you can take a simple list and make displayed as a cool animated and responsive menu somewhere else. In this article, I show you how I created a new Display Template for the SharePoint Search Results.
Open the control template file in any of your preferred editors such as SharePoint Designer and customize the file, as per our need. Upload Control_SearchResults_Custon.html to the search display template.+ Select the Content Type, Name, Title, Description, Target Control Type as a search result.