I am using a Search Results with Refiner web part with SharePoint Online.
The search works, but it returns the URL of the list item, and when clicked on, the user is directed to the list item and all of it's fields. The user is able to look through those fields in the list item and then click on "Tool_URL", but I would rather have the "href" below to go directly to the value of the list field "Tool_URL" from within that list instead of the list itself, thus removing the need for the user to click twice.
Here is the code I have in my template.
<div class="template_root">
{{#if showResultsCount}}
<div class="template_resultCount">
<label class="ms-fontWeight-semibold">{{getCountMessage totalRows keywords}}</label>
</div>
{{/if}}
<ul class="ms-List template_defaultList">
{{#each items as |item|}}
<li class="ms-ListItem ms-ListItem--image" tabindex="0">
</div>-->
<span class="ms-ListItem-primaryText"><a href="{{getUrl item}}">{{Title}}</a></span>
<span class="ms-ListItem-secondaryText">{{getSummary HitHighlightedSummary}}</span>
<div class="ms-ListItem-selectionTarget"></div>
</li>
{{/each}}
</ul>
</div>
I have searched to the best of my ability and I am coming up blank. Is it possible to modify the template to replace <a href="{{getUrl item}}">{{Title}}</a>
with the value of the "Tool_URL" field from within the list item that it is pulling?