if, elsif and else
unless
unless is the opposite of if:
case
Comparisons
Liquid reads
and and or from right to left and has no brackets. For complex rules, nest if tags.
Common examples
Only when the order has a note:Liquid conditions on visual blocks
A block’s Liquid condition is the part that goes inside{% if … %}: one expression, without tags. For example total_price >= 10000 and customer.tags contains 'VIP'. Foliant checks it as you type, against the sample order, and tells you if Liquid can’t read it.
Good to know
- Text comparisons are case sensitive:
'vip'doesn’t match'VIP'. The visual editor’s tag conditions with contain the text ignore case. financial_statusandfulfillment_statusare lowercase, with underscores:paid,partially_refunded,unfulfilled,partially_fulfilled.- Check conditions with the Sample orders and your own recent orders in the preview order picker. See Preview, paper size and zoom.