projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
0fa26d6
)
added an example for the loop variable (closes #732)
author
Fabien Potencier
<fabien.potencier@gmail.com>
Wed, 23 May 2012 05:40:44 +0000 (07:40 +0200)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Wed, 23 May 2012 05:40:44 +0000 (07:40 +0200)
doc/tags/for.rst
patch
|
blob
|
history
diff --git
a/doc/tags/for.rst
b/doc/tags/for.rst
index
5a0f354
..
722861a
100644
(file)
--- a/
doc/tags/for.rst
+++ b/
doc/tags/for.rst
@@
-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