class Crinja::Tag::If
- Crinja::Tag::If
- Crinja::Tag
- Reference
- Object
Overview
The if
tag is a conditional statement. The block content will only be evaluated if the test
condition is truthy. Condition can be an arbitrary Expression
. elif
and else
allow for
multiple branches.
{% if kenny.sick %}
Kenny is sick.
{% elif kenny.dead %}
You killed Kenny! You bastard!!!
{% else %}
Kenny looks okay --- so far
{% endif %}
See Jinja2 Template Documentation for details.