Advanced Widgets templates

This page describes the templates you can override to enable you to customize the HTML output

The templates you can find on this page are default implementations. Changes might occur and will be mostly backward compatible.

The default templates can be downloaded from here (Use "view source" to view the HTML templates.

Template structure

-- We will add a template structure document shortly -- 

Template options

searchine-searchform

Template options:

{{searchfieldplaceholder}} - Provide a placeholder text in the search field
{{searchfieldname}} - The field name
{{searchbuttontext}} - The searchbutton text (when needed)
{{refineresultslabel}} - Text that will be displayed in mobile mode
{{is404widget}} - Is the widget a 404 widget (showing results based on the page URL)
{{disableSearchField}} – Is the search field disabled using the disableSearchField setting

searchine-results-information

Template options:

{{showresultslabel}} - The search results text (View labels)
{{itemsPerPage}} - Items per page
{{searchText}} - The searched keywords
{{numberOfResults}} - Total number of results
{{pageIndex}} - The page index returned
searchine-facetgroup

Template options:

{{DisplayName}} - Facet group display name
{{showfacetgroup this}} - Is the facet group visible (adds css class)
{{iscollapsed this}} - Is the facet group collapsed (adds css class)
{{GroupId}} - Add this to the root (.js-facets-group) to enable searchine to locate the group's selected items.
{{ishidden this}} - Add css class to determine the visibility of the filters group options

Inside each facets ({{#each Facets}})

{{isfacetactive this}} - Is the facet active
{{ischecked this}} - Will render checked="checked" when item is active
{{Value}} - The facet value
{{../Name}} - The parent group (safe) name
{{Hits}} - The number of results with this facet

searchine-activefacet

Template options:

{{Name}} - The name of the facet group
{{Value}} - The value of the facet
{{DisplayName}} - Safe display name of the facet group.
searchine-result

Template options:

{{{Title}}} - The title of the search result with highlighting 
{{{Description}}} - The introduction / description of the search result with highlighting
{{{Uri}}} - The url to the search result
{{Thumbnail}} - Thumbnail URL for preview image
{{displayTags this}}

-- we will add more information shortly --

searchine-prevpage

Template options:

{{disabled this}} - If item is disabled then it will add an extra class disabled
{{Page}} - The index of the page
searchine-activepage

Template options:

{{Page}} - The index of the page
searchine-page

Template options:

{{Page}} - The index of the page
searchine-nextpage

Template options:

{{disabled this}} - If item is disabled then it will add an extra class disabled
{{Page}} - The index of the page
Options
Methods / Events