Display template not working on production

lawrence whittemore asked on August 15, 2023 15:06

I'm having a weird issue where I have a display template set up for my search results. I have created widget for search results that uses the display template, and everything works on my development site, but the template doesn't show on my live site, I am getting a different template (seems like some sort of default template)

the template file live in my Views/Shared/DisplayTemplates/ folder and is called SearchResultsPageItemModel.cshtml

The template that is showing on my live site looks like this but I can't find it anywhere.

<div class="display-label">Type</div>
<div class="display-field">Department Document File</div>
<div class="display-label">Url</div>
<div class="display-field">~/mayo/portals/cerner-training-guides/department-documents/surgery-and-anesthesia/surgery-solution-training-guide</div>
<div class="display-label">Title</div>
<div class="display-field">Surgery Solution Training Guide</div>
<div class="display-label">Content</div>
<div class="display-field"></div>
<div class="display-label">Date</div>
<div class="display-field">8/3/2021 4:09:34 PM</div>
<div class="display-label">ObjectType</div>
<div class="display-field">cms.document</div>
<div class="display-label">ImagePath</div>
<div class="display-field"></div>

Recent Answers


Dmitry Bastron answered on September 4, 2023 08:20

Hi Lawrence,

Could you check on live site you Views/Shared/DisplayTemplates/SearchResultsPageItemModel.cshtml? Chances are, for some reason, it's different from what you have on your local machine.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.