Quantcast
Channel: SharePoint 2010 - Search forum
Viewing all articles
Browse latest Browse all 1578

SharePoint 2013 Search Custom Managed Properties are not showing results.

$
0
0

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">&#39;Utility&#39;:&#39;Utility&#39;,&#39;Audience&#39;:&#39;Audience&#39;</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.


Viewing all articles
Browse latest Browse all 1578

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>