- Getting Started
- Liquid reference
- Filters reference
- Tags reference
- Localization
- Theme structure
- Theme sections
- Theme assets
- Theme config
- Theme layout
- Theme templates
-
- article.liquid
- blog.liquid
- cart.liquid
- collection.liquid
- customer/account.liquid
- customer/addresses.liquid
- customer/details.liquid
- customer/login.liquid
- customer/order.liquid
- customer/register.liquid
- customer/reset-password.liquid
- home.liquid
- page.no-heading.liquid
- products.liquid
- search.liquid
- list-collections.liquid
- store-locator.liquid
- 404.liquid
- customer/activate_account.liquid
- customer/orders.liquid
- Submission
search
The search object has the following attributes:
search.performed
Returns true if an HTML form with the attribute action="/search" was submitted successfully. This allows you to show content based on whether a search was performed or not.
search.terms
Returns the string that was entered in the search input box. Use the highlight filter to apply a different style to any instances in the search results that match up with search.terms.
{{ item.content | highlight: search.terms }}
<strong class="highlight">Yellow</strong> shirts are the best!
search.results_count
Returns the number of results found.
search.results
Returns an array of products matching search result items. More info ›
search.placeholder
Returns the placeholder text for the search input.
search.title
Returns the title of the search results page.
search.results_for_html
Returns the "results for" heading rendered as HTML, including the search terms.
search.no_results_html
Returns the no-results message rendered as HTML.