Lines Matching refs:loop
53 The `loop` variable
56 Inside of a ``for`` loop block you can access some special variables:
61 ``loop.index`` The current iteration of the loop. (1 indexed)
62 ``loop.index0`` The current iteration of the loop. (0 indexed)
63 ``loop.revindex`` The number of iterations from the end of the loop (1 indexed)
64 ``loop.revindex0`` The number of iterations from the end of the loop (0 indexed)
65 ``loop.first`` True if first iteration
66 ``loop.last`` True if last iteration
67 ``loop.length`` The number of items in the sequence
68 ``loop.parent`` The parent context
74 {{ loop.index }} - {{ user.username }}
79 The ``loop.length``, ``loop.revindex``, ``loop.revindex0``, and
80 ``loop.last`` variables are only available for PHP arrays, or objects that
90 Unlike in PHP, it's not possible to ``break`` or ``continue`` in a loop. You
102 The advantage is that the special loop variable will count correctly thus not
104 ``loop.last`` will not be defined when using loop conditions.
108 Using the ``loop`` variable within the condition is not recommended as it
110 condition like ``loop.index > 4`` won't work as the index is only
133 By default, a loop iterates over the values of the sequence. You can iterate