added an example for the loop variable (closes #732)

This commit is contained in:
Fabien Potencier
2012-05-23 07:40:44 +02:00
parent 0fa26d6429
commit 843e1f74ee
+6
View File
@@ -68,6 +68,12 @@ Variable Description
``loop.parent`` The parent context
===================== =============================================================
.. code-block:: jinja
{% for user in users %}
{{ loop.index }} - {{ user.username }}
{% endfor %}
.. note::
The ``loop.length``, ``loop.revindex``, ``loop.revindex0``, and