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
I have had problems finding documentation on the JS api avialable to us in Display Templates. I got almost all of my knowledge by digging into the OOTB Display templates. You will find my pseudocode came from the item templates such as the large image and picture with 3 lines.