Recommendations with Vue SDK
Overview
The recommendations widget purpose is to display of the recommendations data. It could be placed simultaneously with the search box and results widgets, or used separately on target page from the search and results.
Â
Prerequisite
Â
Steps to create
Crete the basic widget configuration described in Creating widgets with Vue SDK and extend the config object with widgetGuid and recommendationApi
RecommendationApi Url is visible on Recommendation API
WidgetGuid is visible on Workbench/ recommendations and can be provided through template and overwrite properties of the config object.
<recommendations widget-guid="..."></recommendations>
Â
One template can contain one or multiple independent recommendations which target different widgets.
Example of single recommendations usage.
<div class="hawk"> <recommendations></recommendations> </div>
Â
Example of consolidated usage of results and recommendations.
<div class="hawk"> <div class="hawk__header"> <search-box></search-box> </div> <div class="hawk__body"> <facet-list></facet-list> <div> <results></results> <recommendations></recommendations> </div> </div> </div>
Â
The following example contains searchbox, results and two recommendations.
Â
Save all the files, re-build and review the page.
Â
Â