A search field can search all your site pages for relevant information when a visitor uses content search to find something on your site. You can add a search field to your HubSpot site pages by setting up a content search results page.
Content search consists of three parts:
- A results systems template
- The Search Field module (where a visitor inputs their search)
- The Search Results module
First, create a search results page system template within the Design Manager:
- In your HubSpot account, navigate to Content > Design Manager.
- Expand the right sidebar menu if needed by clicking the folder folder icon. Then click File > New file. Alternatively, if you don't have any tabs open in your design manager, you can click Create a new file in the upper right-hand corner.
- In the dialog box, select Drag and drop.
- From the Template type dropdown menu, select Search Results Page.
- Name your file and click Create. This new template will contain two new modules: Search Field and Search Results.
Once you’ve added your styling and other components to the page, click Publish changes to publish this template. Next, you'll need to add this template as your default Search results page system template in your settings:
- In your HubSpot account, click the settings icon settings in the main navigation bar.
- In the left sidebar menu, click Marketing > Web Pages.
- Click the System Pages tab.
- From the Search results page dropdown menu, select the search results page you just created and click Save.
You can now use the search field module anywhere on your website. When a user performs a search, the results will be displayed on this search result template.