Skip to content

Liquid ​

Liquid is the templating language YouCan themes are built with. It lets you mix static HTML with logic and store data, so a theme can render a different page for every product, collection, or cart without writing a line of application code.

liquid
<h1>{{ product.name }}</h1>

{% if product.available %}
  <span>{{ product.price | money }}</span>
{% else %}
  <span>{{ 'product.sold_out' | t }}</span>
{% endif %}

Building blocks ​

ObjectsStore data you can output or loop over, like product or cart.
TagsLogic that controls a template: conditionals (if, unless, case), loops (for), and helpers (form, paginate, render). Browse the full list under Developer Tools ▸ Liquid ▸ Tags in the sidebar.
FiltersFunctions applied to a value with the pipe (|) character, for formatting and transforming output, for example {{ product.price | money }}. Browse the full list under Developer Tools ▸ Liquid ▸ Filters in the sidebar.
BasicsThe primitive types and operators Liquid expressions are built from.

Where Liquid runs ​

Liquid renders layouts, templates, sections, and snippets. Which objects are available depends on where you are: some, like cart and settings, are global; others, like product, only exist on the template they belong to. Each template type page documents the objects it receives.