Hi,
I am looking for some assistance. I would like to use the Page Image field in a Item Display Template. I have created the managed property and called it PublishingPageImage. I have added it to <mso:ManagedPropertyMapping section of my Item_DisplayTemplate. It is then referenced in my html using a javascript variable var pubImage = $getItemValue(ctx, “PublishingPageImage”;) and finally referenced it in my DIV using _#= pubImage =#_
The problem is when everything renders on the page i get the following, instead of the image being rendered
Text – <img alt=”” src=”/PublishingImages/2-150-insider-story.jpg” style=”BORDER:0px solid;” />
Can anyone suggest how I might go about using this field to render an image on a display template?
Please see attachments.
Thank you.
-Matt
Hi Eric,
A variation of your suggestion rendered the images. Thank you!
-Matt
PS. I cannot find API documentation for “Srch.ContentBySearch.getPictureMarkup” Do you know where it comes from?