mirror of
https://github.com/pantor/inja.git
synced 2026-02-17 09:03:58 +00:00
fix loop variables
This commit is contained in:
@@ -153,7 +153,7 @@ render(R"(Guest List:
|
||||
2: Tom
|
||||
3: Patrick */
|
||||
```
|
||||
In a loop, the special variables `loop/index (number)`, `loop/index1 (number)`, `loop/is_first (boolean)` and `loop/is_last (boolean)` are defined. In nested loops, the parent loop variables are available e.g. via `loop/parent/index`. You can also iterate over objects like `{% for key, value in time %}`.
|
||||
In a loop, the special variables `loop.index (number)`, `loop.index1 (number)`, `loop.is_first (boolean)` and `loop.is_last (boolean)` are defined. In nested loops, the parent loop variables are available e.g. via `loop.parent.index`. You can also iterate over objects like `{% for key, value in time %}`.
|
||||
|
||||
#### Conditions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user