mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-10 09:26:29 +00:00
added an example for the loop variable (closes #732)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user