Homepage

Liquid - Tags: Theme

Last edit: Oct 26, 2022

liquid

Allows writing multiple tags within one set of delimiters. Use the echo tag to output an expression within a {% liquid %} tag.

Input


{% liquid
case section.blocks.size
when 1
  assign column_size = ''
when 2
  assign column_size = 'one-half'
when 3
  assign column_size = 'one-third'
else
  assign column_size = 'one-quarter'
endcase %}

echo

Outputs an expression in the rendered HTML. This is identical to wrapping an expression in {{ and }}, but works inside liquid tags and supports filters.

Input


{% liquid
  assign name = 'mike'
  assign second_name = 'bill'
  echo name
  echo 1 | plus: 1
%}

Output

mike2

Note

This topic is a compilation of knowledge found at: Shopify Themes, Liquid Documentation, Liquid Gem Documentation, and Liquid for Designers.

Questions?

We are always happy to help with any questions you may have.

contact us