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-featured-items-resultscontent-item>
.
Data Model
The SearchResultsItem object is made available to the Handlebars template:
...
Code Block | ||||
---|---|---|---|---|
| ||||
<div class='search"featured-resultsitems-content__item searchfeatured-resultsitems-content__item--{{type}}'>}}"> {{#if pinned}} <span class="featured-items-content__pin"> <hawksearch-icon name="star"></hawksearch-icon> </span> {{/if}} {{#if (lt salePrice price)}} <span class='search"featured-resultsitems-itemcontent__sale-indicator'">Sale</span> {{/if}} {{#if (eq type '"product'")}} <a hawksearch-link href='"{{url}}'" class='search"featured-resultsitems-content__item__image'"> <img hawksearch-image src='"{{imageUrl}}'" alt=''"" /> </a> {{/if}} <div class='search"featured-resultsitems-content__item__title'"> <a hawksearch-link href='"{{url}}'">{{title}}</a> </div> {{#unless (eq salePrice undefined)}} <div class='search"featured-resultsitems-content__item__price'"> {{#if (lt salePrice price)}} <span class='search"featured-resultsitems-content__item__price__original'">{{currency price 0}}</span> <span class='search"featured-resultsitems-content__item__price__current'">{{currency salePrice 0}}</span> {{else}} <span class='search"featured-resultsitems-content__item__price-__current'">{{currency salePrice 0}}</span> {{/if}} </div> {{/unless}} </div> |