Display template

I have created a display template and uploaded it to _catalogs/masterpage/Display Template/Search. The related .js file is created. The display template file is published.

Result Type I have created a new result type, using Site Settings -> Manage Result Types. Sources: Local People Results (System) Set Priority: 1 (in dropdown)

On People Search Page By Default it is set to Decide Display templates based on Result Type

Expected Behaviour Only documents with the specific tag are returned. The returned items are displayed with the display template created. Actual Behaviour

The search results display only documents with the specific tag. > OK But, the returned items are not displayed with my custom display template.

Additional findings If I use result type rules to decide the result type, the results are displayed with the default template. If I change the Display Template settings of the Search results to use the created display template explicitly, the results are displayed as expected. > This tells me that there is no error in the display template. If i change the Display Template settings of the Search results to use the defined result type explicitly, the results are again displayed with the default template.

it seems that the mapping between result type and display template is somehow not working. Do I have to crawl again? or do something else?

Could anybody give me a hint what I am missing?

1 Answer 1


I had same issue. Display template works fine, but search result web part based on result type doesn't use my template. Usually it means that your search result type condition doesn't fit real objects: check if search source is same in result type and in search result web part, also check if content type id condition in your result type 'begins with' (or play with that rules) if it is based on content type id. Be sure that your result type and result source are defined on site collection level (there are two links in settings page: one for site in Search tab and one for site collection in Admin site collection tab).

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.