Variable

Variable tags create new Liquid variables.

assign

Creates a new variable.

Input

Output

  This statement is valid.

Wrap a variable in quotations " to save it as a string.

Input

Output

bar

capture

Captures the string inside of the opening and closing tags and assigns it to a variable. Variables created through {% capture %} are strings.

Input

Output

I am being captured.

Using capture, you can create complex strings using other variables created with assign.

Input

Output

I am 35 and my favourite food is pizza.

Got an issue? Or want to submit feedback?

Our new Feedback and Issue Tracker is built on GitHub Issues. Just leave your comment below and you can track our team resolve it, or browse issues others have already submitted.

Read how to use the Feedback and Issue Tracker