ifΒΆ

Selects an argument depending on a condition.

For example:

{{ value|if:"yes":"no" }}

This is a shortcut for using the if tag. The same can be expressed as follows:

{% if value %}yes{% else %}no{% endif %}

See also

if

Previous topic

group_title_firstchar

Next topic

if_undefined

Versions

Actions