For the complete documentation index, see llms.txt. This page is also available as Markdown.

Single Word Search

Render results for individual terms from multi-word searches.

Documentation

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}} &euro;</div>
            </ff-record>
        </ff-record-list>
    </ff-single-word-search-record>
</ff-single-word-search>

Demo

API code

Events

Events
Name
Description

dom-updated

Fired every time the element is re rendered.

ff-single-word-search-record

Properties

Properties
Name
Description

word (Object)

The data from FactFinder.

Last updated

Was this helpful?