From 1de4c644c91e94b97e2a95e318a005dc617ccebf Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 11 May 2008 23:55:02 +0200 Subject: [PATCH] documented recursive loops --HG-- branch : trunk --- docs/templates.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/templates.rst b/docs/templates.rst index ea19e2d..90d4099 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -455,6 +455,22 @@ by using `else`:: {% endif %} +It is also possible to use loops recursively. This is useful if you are +dealing with recursive data such as sitemaps. To use loops recursively you +basically have to add the `recursive` modifier to the loop definition and +call the `loop` variable with the new iterable where you want to recurse. + +The following example implements a sitemap with recursive loops:: + + + If ~~ -- 2.26.2