icon Simple Page Search
Created by Orckestra

Show technical information

How to add Simple Page Search  to your website

You can have two approaches to implementing simple page search on your website:

  • Having a dedicated page for the search. This page will feature the search box and show search results.
  • Having a page only for search results while using the search box throughout the website (via the page templates).

For both approaches, do the following:

  1. Create or edit the page you will use for the search results.
  2. Insert the Composite.Search.SimplePageSearch.SearchResults function ( Insert > Function), or add the following code:
    Expand code
  3. If necessary, specify its optional parameters:
    • Show Search Form: If 'True', the search box will be also shown ('True' by default).
    • Search Form Button Label: The text to show on the search form submit button. When left blank, a generic search icon is used. (Blank by default.)
    • Current Site: If selected ("True"), search is only limited to the current site / branch. ("True" by default).
    • Page Size: The number of search results per page ("10" by default).
    • Show Descriptions: If 'True',search results will have descriptions (when available) shown below the title.

If you choose to have a dedicated page for search, keep the default value ('True') in the "Show Search Form" parameter.

If you choose to only show results on a dedicated page, and have the search box on all the pages of your website,  set the "Show Search Form" parameter to 'False' to hide the search box on the search results page, and take the following steps:

  1. Edit the template(s) used with the pages on your website.
  2. Insert the Composite.Search.SimplePageSearch.SearchForm function ( Insert > Function Markup), or add the following code:
    Expand code
  3. Specify its required parameter:
    • Search Result Page: The page where the search results will be displayed (see above).
  4. If necessary, specify its optional parameter:
    • Search Button Label: The text to show on the search form submit button. When left blank, a generic search icon is used. (Blank by default.)