Hello I'm making a display template to view corporate news.
For this i use the OOTB Page layout Article left picture. In my display template I want to show a summary of the body for that i taught i could use the hithighlightedsummary managedProperty. But the property return null (even when map the property to the OOTB display templates).
I try to use the ultimate Diagnostic display template of eliostruf and the hithighlightedsummary managedProperty have of value. I try the SearchQueryTool, the hithighlightedsummary managedProperty have a value. But with my display template and the OOTB display template the property is null ...
Do you have any idea ?
here result with my display template
Result with the ultimate Diagnostic display template
Here my display template :
<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head><title>All Articles</title><!--[if gte mso 9]><xml><mso:CustomDocumentProperties><mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden><mso:ManagedPropertyMapping msdt:dt="string">'Link URL'{Link URL}:'Path','Title'{Title}:'Title','Date Article'{Date Article}:'ModifiedOWSDATE','Highlighted Summary'{Highlighted Summary}:'HitHighlightedSummary','Tags'{Tags}:'owstaxIdBlsNewsTags','Picture URL'{Picture URL}:'PublishingImage;PictureURL;PictureThumbnailURL'</mso:ManagedPropertyMapping><mso:MasterPageDescription msdt:dt="string">This Item Display Template.</mso:MasterPageDescription><mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId><mso:TargetControlType msdt:dt="string">;#Content Web Parts;#</mso:TargetControlType></mso:CustomDocumentProperties></xml><![endif]--></head><body><script>
Srch.U.registerRenderTemplateByName("getsearchdatafortwolines", getSearchDataForTwoLines);
function getSearchDataForTwoLines(ctx) {
var itemData = [];
var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_BlsArticles_");
itemData["containerId"] = encodedId + "container";
var linkURL = $getItemValue(ctx, "Link URL");
linkURL.overrideValueRenderer($urlHtmlEncode);
itemData["linkURL"] = linkURL;
var title = $getItemValue(ctx, "Title");
title.overrideValueRenderer($contentLineText);
itemData["title"] = title;
var dateArticle = $getItemValue(ctx, "Date Article");
dateArticle.overrideValueRenderer($contentLineText);
itemData["dateArticle"] = dateArticle;
var highlightedSummary = $getItemValue(ctx, "Highlighted Summary");
highlightedSummary.overrideValueRenderer($contentLineText);
itemData["highlightedSummary"] = highlightedSummary;
var tags = $getItemValue(ctx, "Tags");
tags.overrideValueRenderer($contentLineText);
itemData["tags"] = tags;
var pictureURL = $getItemValue(ctx, "Picture URL");
pictureURL.overrideValueRenderer($contentLineText);
itemData["pictureURL"] = pictureURL;
return itemData;
}
</script><div id="TwoLines"><!--#_
var itemData = Srch.U.getRenderTemplateCollection().getsearchdatafortwolines(ctx);
var containerId, linkURL, title, dateArticle, highlightedSummary, tags, pictureURL;
containerId = itemData["encodedId"];
linkURL = itemData["linkURL"];
title = itemData["title"];
dateArticle = itemData["dateArticle"];
highlightedSummary = itemData["highlightedSummary"];
tags = itemData["tags"];
pictureURL = itemData["pictureURL"];
_#--><div class="cbs-Item" id="_#= containerId =#_" data-displaytemplate="Item2Lines">
Container: _#= containerId =#_ <br />
Link: _#= linkURL =#_ <br />
Title: _#= title =#_ <br />
Date: _#= dateArticle =#_ <br />
Summary: _#= highlightedSummary =#_ <br />
Tags: _#= tags =#_ <br />
Picture: _#= pictureURL =#_ <br /></div></div></body></html>Leumas