The if tag is a basic conditional operator, eg.
{% if 4 > 5 %}
 less is greater
{% elsif 3 == 2 %}
 3 is 2
{% else %}
 neither
{% endif %}

{% if 'apples' like 'apple' %}
  true
{% else %}
  false
{% endif %}

{% if 'apples' contains 'apple' %} 
  true 
{% else %} 
  false 
{% endif %}
        

The if tag must be closed with an endif tag.


The Unless Tag
{% unless name == PearOrAvacado %}
 {{role}}
{% else %}
 {{other_role}}
{% endunless %}


The Case Tag

{% case a.size %}
 {% when 1 %}
  Small
 {% when 2 %}
  Big
{% endcase %}