0
<body>
<div id="Item">
<!--#_
var siteURL = SP.PageContextInfo.get_siteServerRelativeUrl();
var linkURL = $getItemValue(ctx, "Path");
linkURL.overrideValueRenderer($urlHtmlEncode);
var title = $getItemValue(ctx, "Title");
var description = $getItemValue(ctx, "Description");
var pictureURL = $getItemValue(ctx, "PictureURL");
var customURL = $getItemValue(ctx, "SliderURL");
 _#-->

    <a href="_#= customURL =#_">
    <img src="_#= pictureURL =#_" alt="_#= $htmlEncode(title) =#_">
    </a>
</div>
</body>

The var customURL is not retrieving any data. I cannot figure out why.

I have a custom field called SliderURL in a library called "Slider". I created a managed property called SliderURL and mapped it to the custom field in the "Slider" library.

Mapped them in the begginning of the item template:

<mso:ManagedPropertyMapping msdt:dt="string">&#39;Title&#39;:&#39;Title&#39;,&#39;Path&#39;:&#39;Path&#39;,&#39;Description&#39;:&#39;Description&#39;,&#39;PictureURL&#39;:&#39;PictureURL&#39;,&#39;SliderURL&#39;:&#39;SliderURL&#39;</mso:ManagedPropertyMapping>

1 Answer 1

1

Looks like this actually worked. I had to re-index the library "Slider" and it took effect immediately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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