Documentation

Searching

For searching in the pages content, one of search module implementations should be installed. How to setup a search module, is discussed here.

Search module comes with 2 widgets: Search input form and Search results. How to add widget to the page is discussed here. How to edit widget options, is discussed here.

Search form widget

Insert Search input form widget to the page. The form with input field and search button will be rendered in the place of inserted widget.

Widget configuration options:

  • Form.Method. Default value: GET. Form method (GET / POST).
  • SearchResults.Url. Default value: null. Form action URL: URL where page is being redirected when submitting form (for example, /search-results/). If set to null - current page.
  • Input.Placeholder. Default value: Enter search query .... The text, which will be visible in the input field, while search query is not entered.
  • Label.Title. Default value: null. Text, which is visible nearby the input field (input field's label).
  • Query.Parameter.Name. Default value: Query. Input field's name. Will be visible, when submitting form via GET request (for example: ?Query=test)
  • Submit.Title. Default value: Search. Submit button's title.

Widget styles:

These CSS classes are used for custom styling: bcms-search-input-form (form tag), bcms-search-input-label (label tag), bcms-search-input (search input tag), bcms-search-submit (search submit tag).

Search results widget

Insert Search results widget to the page. The grid with search results and information about total search results will be rendered in place of inserted widget.

Widget configuration options:

  • Query.Parameter.Name. Default value: Query. Form's input field's name. For example, if page URL parameters are ?SearchQuery=test&OtherField=value2 and option's value is SearchQuery, search query will be constructed from GET/POST parameter SearchQuery.
  • SearchResults.Count. Default value: 10. Count of visible results.
  • SearchResults.Show.Total.Count. Default value: true. Determines, if total count message (described below) should be rendered.
  • SearchResults.Total.Count.Message. Default value: Showing {0} / {1} result(s) found for "{2}".. Message, which is displayed when results are returned. {0} is replaced with displaying results count, {1} - with total results count and {2} - with search query, wrapped with span, containing css class bcms-total-search-results-query. An example of returned result: Showing 10 / 24 result(s) found for "<span class="bcms-total-search-results-query">test</span>"..

Widget styles:

These CSS classes are used for custom styling: bcms-total-search-results (message about total count of results), bcms-total-search-results-query (total count results message's search query wrapper), bcms-search-result (each search result item), bcms-denied-search-result (search results item, which contains denied content).