When you run a search on a Search experience, you’re on a webpage. When building on the Theme, the Universal Search and each Vertical Search are individual webpages. Therefore your first step is adding the pages you need to make your experience.
If you are creating a full, multi-vertical experience, you’ll want to create:
- A Universal Search Page
- Your Universal page should be named “index” and thus your Universal Search files will be named
pages > index.html.hbs
andconfig > index.json
.
- Your Universal page should be named “index” and thus your Universal Search files will be named
- A Vertical Search Page for each vertical
- We recommend you name the Vertical page a user-friendly name, like “faqs”, “locations”, “doctors”, or “branches”.
If you’re just creating a single vertical search experience, like a Restaurant Locator or a Job Finder, you need to create:
- A Vertical Search Page
- If you are building only a single vertical experience with no Universal Search, you would want to name that vertical page “index” instead.
To add a new page to the frontend:
- Click Pages in the navigation bar and click on your desired site.
- Click on the View Code Editor button.
- Hover over the master branch and click on the pencil icon () that appears.
- Click on Tools
- Select Jambo Commands.
- Select Add a Vertical or Add Page. Steps differ slightly depending which you option you choose:
-
Add a Page:
- Name the Page. Note that the name you select will be the URL path for that page.
- Select a Page Template.
- If you are using this command to set up a Vertical Search Page, you will need to add inputs to the
verticalKey
andcardType
property in the config file completing the Add a Page modal. Therefore, we typically recommend using the Add a Vertical command listed below.- Note: This command should be used when creating a Universal Search Page since vertical keys and card types are not necessary to set them up.
-
Add a Page:
-
Add a Vertical:
- Name the Page. Note that the name you select will be the URL path for that page.
- Fill in the Vertical Key. This will match the vertical key that you assigned in the backend. You can find it in the Additional Vertical Settings on the Search Configuration Verticals screen.
- Select the Card Type you want to use for the vertical. See Built-in Card Types for the layout options.
- Select a Page Template. To see an example of available page layouts, see the Page Templates reference doc.
- Click Submit.
- Jambo will fork the page template defined in the theme so can then customize as needed. You will see two new files in your repository:
- pages > [pageName].html.hbs
- config > [pageName].json
Comments
0 comments
Article is closed for comments.