added another example for the range filter
authorfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Sun, 13 Dec 2009 14:46:07 +0000 (14:46 +0000)
committerfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Sun, 13 Dec 2009 14:46:07 +0000 (14:46 +0000)
git-svn-id: http://svn.twig-project.org/trunk@172 93ef8e89-cb99-4229-a87c-7fa0fa45744b

doc/02-Twig-for-Template-Designers.markdown

index fd1a598..4560e0f 100644 (file)
@@ -406,6 +406,13 @@ filter:
 The above snippet of code would print all numbers from 0 to 9 (the high value
 is never part of the generated array).
 
+It can be also useful with letters:
+
+    [twig]
+    {% for letter in 'a'|range('z') %}
+      * {{ letter }}
+    {% endfor %}
+
 Inside of a `for` loop block you can access some special variables:
 
 | Variable              | Description