diff --git a/doc/tags/if.rst b/doc/tags/if.rst index 273207d0b..b10dcb4b3 100644 --- a/doc/tags/if.rst +++ b/doc/tags/if.rst @@ -29,6 +29,14 @@ You can also test if an array is not empty: If you want to test if the variable is defined, use ``if users is defined`` instead. +You can also use ``not`` to check for values that evaluate to ``false``: + +.. code-block:: jinja + + {% if not user.subscribed %} +

You are not subscribed to our mailing list.

+ {% endif %} + For multiple branches ``elseif`` and ``else`` can be used like in PHP. You can use more complex ``expressions`` there too: