Search a Section of Your Site

Goal: Give visitors a search box for one part of your site, such as a guide library, a resource center, or a help center.

Time: About 3 minutes.

You need: An editable page and published pages under the section path you want to search.

Watch the section search walkthrough

Set a path prefix, run a section search, and compare it with the same search from the site header. The narration is in English. Turn on captions in the player.

Set the search scope

  1. On the section landing page, add a Search Form block to the Main slot.
  2. In the block fields, set the accessible label, placeholder and button label so visitors know where they are searching. The example uses Search guides as its label and button text.
  3. Enter the section’s page path in Search path prefix, such as /guides for a guide library, /resources for a resource center or /support for a help center. Use the page path without the domain or a language prefix. Save the block.
Search Form block fields with Search guides as the accessible label and /guides as the search path prefix.
The form uses /guides as its search path prefix.

Compare the results

Open the page preview and search for a term used both inside and outside the section. In the Northstar Studio example, lighting returns two matching guides. The search dialog shows the active scope, Search within /guides, and every result is under that path.

Search dialog showing two results for lighting, both with paths under /guides.
A search for lighting returns two results under /guides.

If the site header has a search button from Header Actions, open it and run the same query. This site-wide search also finds the matching journal entry. A Search Form with an empty Search path prefix searches the whole site as well.

Was this guide helpful?

Rate how clearly it showed you how to limit a Search Form to a section.

No ratings yet.

Questions and comments

Which part of your site would benefit from its own search? Share an example or ask about setting the scope.

Comments

0

No approved comments yet.

Leave a comment

Comments are reviewed before they appear.