The content between {if} and {/if} renders when the condition is
true. Inside it, {elseif condition} starts a branch that is tried when every
branch before it failed, and {else} the branch that renders when none held. Only
one branch ever renders.
The condition is a PAD expression: fields ($count), literals, the comparison
operators eq ne gt lt ge le (or == != > < >= <=),
and, or, not, range (a, b),
in ('a', 'b'), like and matches. A bare value is tested
for its truth - write a comparison when a value is meant: {if $count eq 0}.
A property of an enclosing loop reads as a value in the condition:
{if first@items}, {if current@items eq 2}.
Under the strict syntax check (the default) a field that does not exist is an error rather than an empty value, so a typo in a condition is reported instead of silently taking the else branch.