Single Word Search
Render results for individual terms from multi-word searches.
Documentation
Single Word Search
Use ff-single-word-search to split a search into separate words. Each word and its search results render in an ff-single-word-search-record.
The element has no additional attributes. It only appears when the search request has more than one word.
Inside each record, access the word with {{word}}, its {{recordCount}}, and its matching products. Use data-search="singleWord" to trigger a search for that word.
<ff-single-word-search>
<!-- Define a header if needed. -->
<h1>
<span id="singleWordSearchCaption">For a part of your search following products could be found:</span>
</h1>
<!-- Design the look of single-word search. -->
<ff-single-word-search-record>
<!-- Use data-search="singleWord" to trigger a search for this word. -->
<!-- Use recordCount only inside the data-search element. -->
<h1 data-search="singleWord">{{word}} ({{recordCount}})</h1>
<ff-record-list>
<ff-record>
<img data-image="{{record.ImageName}}">
<div class="title">{{record.Title}}</div>
<div class="price">{{record.Price}} €</div>
</ff-record>
</ff-record-list>
</ff-single-word-search-record>
</ff-single-word-search>Demo
Try the Single Word Search demo.
API code
ff-single-word-search
Events
ff-single-word-search-record
Properties
Last updated
Was this helpful?