Skip to content

Commit

Permalink
Document if statement with multiple conditions
Browse files Browse the repository at this point in the history
Closes #1284
  • Loading branch information
equivalentideas authored and fdintino committed Jul 13, 2020
1 parent 1e29863 commit 7ddd747
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/templating.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,18 @@ and `else`:
{% endif %}
```

You can specify multiple conditions with `and` and `or`:

```jinja
{% if happy and hungry %}
I am happy *and* hungry; both are true.
{% endif %}
{% if happy or hungry %}
I am either happy *or* hungry; one or the other is true.
{% endif %}
```

You can also use if as an [inline expression](#if-expression).

### for
Expand Down

0 comments on commit 7ddd747

Please sign in to comment.