At last I got time to play with Display Template. Though this is a simple implementation, this work provided better understanding of customizing the Display template for SharePoint Search results.
The requirement is simple. By default, when you do search, it displays Results Count at the bottom of the page as shown below.
The requirement is to shown the Results Count at the top just above search results as shown below:
Let us see how do we achieve this.
Let us first understand how default display template is related. Navigate to Results.aspx, edit page, and edit Search Results web part. You will see something like below.
If you closely look at the "Display Templates" section, there is something called "Results Control Display Template" and it is by default set to "Default Result".
Now, we need to locate the file and modify it to our needs. For this, navigate to Master Page Gallery -> Display Templates folder -> Search folder and here look for Contr…
The requirement is simple. By default, when you do search, it displays Results Count at the bottom of the page as shown below.
The requirement is to shown the Results Count at the top just above search results as shown below:
Let us see how do we achieve this.
Let us first understand how default display template is related. Navigate to Results.aspx, edit page, and edit Search Results web part. You will see something like below.
If you closely look at the "Display Templates" section, there is something called "Results Control Display Template" and it is by default set to "Default Result".
Now, we need to locate the file and modify it to our needs. For this, navigate to Master Page Gallery -> Display Templates folder -> Search folder and here look for Contr…