I've built a DisplayTemplate (ItemTemplate) for a ContentSearchWebPart. It works quite well for different fields, but I don't get my PublishingImage from the pages I'm querying. The ManagedPropertyMapping is as follows:

<mso:ManagedPropertyMapping msdt:dt="string">'Picture URL'{Picture URL}:'PublishingImage','Link URL'{Link URL}:'Path','Line 1'{Line 1}:'Title','Line 2'{Line 2}:'Description','Line 3'{Line 3}:''</mso:ManagedPropertyMapping>

I also tried the following Version, but It also doesn't works:

<mso:ManagedPropertyMapping msdt:dt="string">'Picture URL'{Picture URL}:'PublishingImage;PictureURL;PictureThumbnailURL', ......

In the following code "pictureURL" is empty while my other itemvalues are correct.

var pictureURL = $getItemValue(ctx, "Picture URL");

Has anybody an idea what I'm missing or doing wrong?

  • before crawling, did you see grey boxes with a questionmark instead of pictures? – user42952 Jun 3 '15 at 14:38

After several tries, I recognized that the code (display temaplte) works. I had to run the search crawler (full crawl) one more time.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.