Home
Modules
Site Search
Last Edited: Sep 27, 2019
All pages and items with a detail view are automatically searchable. Disabled items and Secure Zones are not searched.
Search field
{% include 'site_search_input', search_placeholder: 'Search', result_page_url: "search-results" -%}
Search results
{% include 'site_search_results', layout: 'default', per_page: '20' -%}
Search field
search_placeholder
- default is search
- Placeholder value that displays in the
input field
result_page_url
- default is search-results
- Allows user to define location of
redirect to receive results
Search results
per_page
- default is 20
- defines the number of items outputted on the page
layout
- default is default
- defines the layout file used to display the results
Site Search Module layouts are stored in the following folder structure, which you can view via Code Editor:
layouts/modules/site_search/
Within this module folder you will find the following layout folders:
results/
- the results layout folder
design_system/
- default design system layouts folder
item.liquid
- items displayed within the results wrapper
wrapper.liquid
- wrapper of the list displayed using the results syntax
To create a custom layout, right click on the results folder and write a folder, followed by the two required files (item & wrapper). For example, type: custom_layout_1/wrapper.liquid
to create a folder called "custom_layout_1" that contains a file called "wrapper". Right click on your "custom_layout_1" folder to create the final item.liquid file.