Site Search

 Last Edited: May 23, 2019

All pages and items with a detail view are automatically searchable. Disabled items and Secure Zones are not searched.

Syntax

Search field
{% include 'site_search_input' result_page_url: "search-results" -%}

Search results
{% include 'site_search_results' -%}

Parameters

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 Files

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.