You can use variable tags to create new Liquid variables.
Creates a new named variable.
assigned variables can be strings or booleans (true or false). Remember not to use quotation marks around the value if it is
Captures the string inside of the opening and closing tags and assigns it to a variable. Variables that you create using
capture are stored as strings.
capture, you can create complex strings using other variables created with
Creates a new number variable, and increases its value by 1 every time
increment is called on the variable. The counter's initial value is 0.
increment counter is used to create a unique numbered class for each list item:
Variables created using
increment are separate from variables created using
In the example below, a variable named
my_number is created using
increment tag is then used several times on a variable with the same name. Note that the
increment tag does not affect the value of
my_number that was created through
Creates a new number variable, and decreases its value by 1 every time
decrement is called on the variable. The counter's initial value is -1.
Like increment, variables declared using
decrement are independent from variables created using