Table of Contents |
---|
Overview
The Search Results Featured Items Content Item component displays information for an individual product or page.
...
Info |
---|
This component should only be used within the context of the Search Results List Featured Items Content component. |
Selector
The selector for this component is <hawksearch-resultsfeatured-items-content-item>
.
Data Model
The SearchResultsItem object is made available to the Handlebars template:
...
Code Block | ||||
---|---|---|---|---|
| ||||
<div class='searchfeatured-resultsitems-content__item searchfeatured-resultsitems-content__item--{{type}}'> {{#if (lt salePrice price)}} <span class='search-results-item__sale-indicator'>Sale</span> {{/if}} {{#if (eq type 'product')}} <a hawksearch-link href='{{url}}' class='searchfeatured-resultsitems-content__item__image'> <img hawksearch-image src='{{imageUrl}}' alt='' /> </a> {{/if}} <div class='searchfeatured-resultsitems-content__item__title'> <a hawksearch-link href='{{url}}'>{{title}}</a> </div> {{#unless (eq salePrice undefined)}} <div class='searchfeatured-resultsitems-content__item__price'> {{#if (lt salePrice price)}} <span class='searchfeatured-resultsitems-content__item__price__original'>{{currency price 0}}</span> <span class='searchfeatured-resultsitems-content__item__price__current'>{{currency salePrice 0}}</span> {{else}} <span class='searchfeatured-resultsitems-content__item__price-__current'>{{currency salePrice 0}}</span> {{/if}} </div> {{/unless}} </div> |