I am trying to customize search result through display template. I am customizing "Item_CommonItem_Body.html" file to include custom managed property in the place of title I am trying to put custom managed property
I created one variable
var xxx_subject = ctx.CurrentItem.DocSubjectXXX;
using same in
var titleHtml = String.format('<a clicktype="{0}" id="{1}" style="cursor: pointer;" class="ms-srch-item-link" title="{3}" onfocus="{4}" {5}>{6}</a>',
$htmlEncode(clickType), $htmlEncode(id + Srch.U.Ids.titleLink), $urlHtmlEncode(url), $htmlEncode(ctx.CurrentItem.Title),
showHoverPanelCallback, appAttribs, xxx_subject);
But I am always getting empty value. But at the same time when I try to see with SharePoint 2013 Search Query Tool v2.1 I get the data.
So I don't know what I am doing mistake !!!