tweaked the iterable example in the docs

This commit is contained in:
Fabien Potencier
2012-04-21 15:46:19 +02:00
parent fa0b0985c3
commit 07a953e016
+4 -1
View File
@@ -11,6 +11,9 @@
{# evaluates to true if the foo variable is iterable #}
{% if users is iterable %}
{% for user in users %}
- {{ user }}
Hello {{ user }}!
{% endfor %}
{% else %}
{# users is probably a string #}
Hello {{ users }}!
{% endif %}