Hello,
I want to configure the search template "Item_WebPage.Html" in Such a way that it should display custom managed properties at the bottom of each search result for web page.
I added following code for reference.
<mso:ManagedPropertyMapping msdt:dt="string">'Utility':'Utility','Audience':'Audience'</mso:ManagedPropertyMapping>
and following code to display results:
<div id="_#= $htmlEncode(itemId) =#_" name="Item" data-displaytemplate="WebPageItem" class="ms-srch-item" onmouseover="_#= ctx.currentItem_ShowHoverPanelCallback =#_" onmouseout="_#= ctx.currentItem_HideHoverPanelCallback =#_"> _#=ctx.RenderBody(ctx)=#_ <div>Utility: _#= ctx.CurrentItem.Utility =#_</div> <div>Audience: _#= ctx.CurrentItem.Audience =#_</div
But It doesn't display the results. I tried to debug this as well it says me that it is undefined.
However when I created the custom display template the results appear fine with the same code. But preview is gets lost.
Please let me know if there is anything that I can do...
V.S.