diff options
| author | Jonathan Stròˆbele <mail@jonathanstroebele.de> | 2025-02-13 16:23:29 +0100 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-02-24 16:25:53 +0100 |
| commit | 240421c7c4c81fe5df26274b807266bd4ca73d7f (patch) | |
| tree | e9f57be777f592e51687b8f731f2dc80fac373b2 /docs | |
| parent | 582ba18d56167587e290545f113d3956e73a5801 (diff) | |
Fixed #36186 -- Added forloop.length variable within a template for loop.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/templates/builtins.txt | 5 | ||||
| -rw-r--r-- | docs/releases/6.0.txt | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 8851fd50ea..247f5e9890 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -423,10 +423,15 @@ Variable Description loop (0-indexed) ``forloop.first`` True if this is the first time through the loop ``forloop.last`` True if this is the last time through the loop +``forloop.length`` The length of the loop ``forloop.parentloop`` For nested loops, this is the loop surrounding the current one ========================== =============================================== +.. versionchanged:: 6.0 + + The variable ``forloop.length`` was added. + ``for`` ... ``empty`` --------------------- diff --git a/docs/releases/6.0.txt b/docs/releases/6.0.txt index d8e35bb557..5d173c981f 100644 --- a/docs/releases/6.0.txt +++ b/docs/releases/6.0.txt @@ -207,7 +207,8 @@ Signals Templates ~~~~~~~~~ -* ... +* The new variable ``forloop.length`` is now available within a :ttag:`for` + loop. Tests ~~~~~ |
