liquid
Last updated View as Markdown
Runs several tags inside one set of delimiters. Each line inside the tag is one tag, written without its own {% and %}.
- Block tags such as
if,case, andforneed their closing tag on its own line. - Use
echoto output a value. It accepts filters. - Variables assigned inside the tag stay available after it.
Example:
liquid
{% liquid
assign size = 20
case size
when 10
assign page_status = 'low'
when 20
assign page_status = 'exact'
when 30
assign page_status = 'high'
else
assign page_status = 'unknown'
endcase
echo page_status | upcase
%}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Output
html
EXACT1