Basics
Operators
Operator | Meaning | Work | Syntax |
---|---|---|---|
== | equals | ||
!= | does not equal | ||
> | greater than | ||
< | less than | ||
>= | greater than or equal to | ||
<= | less than or equal to | ||
or | logical or | ||
and | logical and | ||
contains | checks for the presence of a substring inside a string |
Truthy and falsy
TBD
Types
...
Operator | Meaning | Work | Syntax |
---|---|---|---|
comment | Any text within the opening and closing comment blocks will not be output, and any Liquid code within will not be executed | Yes | {% comment %} Text {% endcomment %} |
Control flow
TBD
Operator | Meaning | Work | Syntax |
---|---|---|---|
if | Executes a block of code only if a certain condition is | Yes | {% assign c1 = dynamicfields.name| evaltext: 'equalTo', 'Jennifer' %} {% unless c1 == true %} Text {% endif %} |
unless | Executes a block of code only if a certain condition is not me | Yes | {% assign c1 = dynamicfields.name| evaltext: 'equalTo', 'Jennifer' %} {% unless c1 == true %} Text {% endunless %} |
elsif/else | Adds more conditions within an if or unless block. | ||
case/when | Creates a switch statement to compare a variable with different values |
Iteration
TBD
Variable
TBD
Filters
TBD
Operator | Meaning | Work | Syntax |
---|---|---|---|
append | yes | {{ "Hello " | append: "Carl" }} {% assign c1 = dynamicfields.name %} {{ "Hello" | append: c1 }} {{ "Hello " | append: dynamicfields.name }} | |
upcase | Makes each character in a string uppercase. It has no effect on strings which are already all uppercase. | Yes | {{ dynamicfields.name | upcase }} |