Skip to main content
The <ws-search-info> component displays information about the search result, for example the total number of hits, the search term, or the result range currently shown. The display is controlled via a freely definable template and updates automatically when new search results are available. The component replaces the previous hit display via the CSS class total-container.

Prerequisite

  • JavaScript bundle ws-search-component-<version>.js from version 1.9.1 onwards

Component

The component can be used multiple times on a page, for example on the category and search result page.
  • Attributes
    • data-template: Required. Template string with placeholders that defines the displayed text.
    • source: Optional. Limits the display to one or more sources (comma-separated), for example source="content" or source="content_static,content_blog". Without a source attribute, the values refer to the entire search result.

Available placeholders

Behavior

  • The component can be used multiple times on a page.
  • The display updates automatically as soon as new search results are available (for example after filtering, sorting, or paging).
ws-search-info is available from ws-search-component-1.9.1.js onwards and replaces the previous hit display via elements with the CSS class total-container and the data-template attribute. The previous approach can still be used, but should no longer be used in new projects.