Add a search box to a site
Let visitors search the published site's pages, in their own language.
A search box lets visitors find any page of the published site by what it says. It searches the pages in the language the visitor reads them in.
Add one
- Open Insert and drag Site search onto the page, in the header for example.
- With it selected, set it in Properties:
- Name for screen readers: what assistive technology calls the box, such as "Search the site".
- Hint in the box: the grey text in the empty box; leave it empty for none.
- When nothing matches: what the results say then.
- Results shown at most: up to 20.
- Show the matching passage: each result shows the words that matched under its title.
- Style the box like any layer; the results take its text style.
Its texts translate like the rest of the site.
What it finds
- The pages of the visitor's language, as they were at the last publish: the index is made each time you publish.
- Not the pages you keep out of search engines, nor unpublished pages.
- The search loads only when a visitor starts typing, so it doesn't slow the page down.