Liquid for Themes
Build themes faster with our all-new Liquid references. Object properties, type information, syntax highlighting, and interactive code blocks help you quickly prototype your use case directly in our docs.
What is a template language?
A template language allows you to create a single template to host static content, and dynamically insert information depending on where the template is rendered. For example, you can create a product template that hosts all of your standard product attributes, such as the product image, title, and price. That template can then dynamically render those attributes with the appropriate content, depending on the current product being viewed.
Variations of Liquid
The variation of Liquid in this reference extends the open-source version of Liquid for use with Shopify themes. It includes tags, filters, and objects that can be used to render objects specific to Shopify stores and storefront functionality.
Shopify also uses slightly different versions of Liquid to render dynamic content for the following features. These variations aren’t included in this reference.
Liquid basics
Liquid is used to dynamically output objects and their properties. You can further modify that output by creating logic with tags, or directly altering it with a filter. Objects and object properties are output using one of six basic data types. Liquid also includes basic logical and comparison operators for use with tags.
Modifying output with filters
Liquid filters are used to modify the output of variables and objects. To apply filters to an output, add the filter and any filter parameters within the output's curly brace delimiters, preceded by a pipe character.