aboutsummaryrefslogtreecommitdiffstats
path: root/doc/build/syntax.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/build/syntax.rst')
-rw-r--r--doc/build/syntax.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/build/syntax.rst b/doc/build/syntax.rst
index f98fca1..239bd16 100644
--- a/doc/build/syntax.rst
+++ b/doc/build/syntax.rst
@@ -109,6 +109,23 @@ line, by escaping it as in ``%%``:
%% some more text
+The Loop Context
+----------------
+
+Mako 0.7 includes a new feature called the **loop context** which
+provides additional information about a loop while inside of a ``% for``
+structure:
+
+.. sourcecode:: mako
+
+ <ul>
+ % for a in ("one", "two", "three"):
+ <li>Item ${loop.index}: ${a}</li>
+ % endfor
+ </ul>
+
+See :ref:`loop_context` for more information on this feature.
+
Comments
========