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. First you'll create and publish new Search Results Page system template in the design manager tool. Then you'll select this template for your system page default in your settings.
Create a search results page system template
- In your HubSpot account, navigate to Marketing > Files and Templates > Design Tools.
- Expand the right sidebar menu if needed by clicking the folder folder icon. Then click the File dropdown menu and select 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.
Select this template as your Search results page system template
- In your HubSpot account, click the settings icon settings in the main navigation bar.
- In the left sidebar menu, navigate to Website > Pages.
- Click the System Pages tab.
- From the Search results page dropdown menu, select the search results page you just created.
- Click Save to apply your changes. 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.