Advanced Liquid Markup

Existence Exports

Offload complex comparisons to the query/recipient list as opposed to the mailing by leveraging an existence export. For instance, instead of using this nested Liquid markup:

{% if {{major}} == 'Philosophy'%}{% if {{school_state}} == 'Oregon' or {{address_state}} == 'Connecticut' %}This was tough!{% endif %}{% endif %}

Add an existence export:

advance.png

Allowing for easier comparison:

{% if {{philosophy_location}} == 'Y' %}Phew! That was much easier!{% endif %} 
Checking for Empty or Not Empty Merge Fields

An existence export is ideal for determining if a field is or is not empty. Liquid markup may also be used in this case.

Note: In the syntax below '' is two single quotes with no space between them.

{% if {{major}} == null or {{major}} == '' %}The major field is empty!{% endif %}
{% if {{major}} != null and {{major}} != '' %}The major field is not empty!{% endif %}
Was this article helpful?
13 out of 24 found this helpful