Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Basics

Operators

OperatorMeaningWorkSyntax
==equals(/) 
!=does not equal  
>greater than  
<less than  
>=greater than or equal to  
<=less than or equal to  
orlogical or  
andlogical and  
containschecks for the presence of a substring inside a string  

Truthy and falsy

TBD

Types

TBD

TAGS

Comment

OperatorMeaningWorkSyntax
commentAny 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

OperatorMeaningWorkSyntax
if

Executes a block of code only if a certain condition is true

Yes{% assign c1 = dynamicfields.name| evaltext: 'equalTo', 'Jennifer' %} {% if c1 == true %} Text {% endif %}
unlessExecutes a block of code only if a certain condition is not meYes {% assign c1 = dynamicfields.name| evaltext: 'equalTo', 'Jennifer' %} {% unless c1 == true %} Text {% endunless %}
elsif/elseAdds more conditions within an if or unless block.  
case/whenCreates a switch statement to compare a variable with different values  

Iteration

TBD

Variable

TBD

Filters

TBD

OperatorMeaningWorkSyntax
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 }}
    

 

 

  • No labels