Variables
Last updated
Was this helpful?
Last updated
Was this helpful?
Like other language, Liquid stores information in variables. There are two Liquid tags that facilitate creating variables: assign, and capture.
The assign tag creates a new variable.
The capture tag is a useful tool for creating strings of multiple variables, which is very useful in Mechanic. We use this tag extensively in our task code for capturing GraphQL queries, email bodies, and more.
In the following example, the string is captured into a variable named query
.