From 237c3ff89e4535343b17a7be2cbda3ead0e451b2 Mon Sep 17 00:00:00 2001 From: fabien Date: Sun, 13 Dec 2009 14:46:07 +0000 Subject: [PATCH] added another example for the range filter git-svn-id: http://svn.twig-project.org/trunk@172 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- doc/02-Twig-for-Template-Designers.markdown | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/doc/02-Twig-for-Template-Designers.markdown b/doc/02-Twig-for-Template-Designers.markdown index fd1a598..4560e0f 100644 --- a/doc/02-Twig-for-Template-Designers.markdown +++ b/doc/02-Twig-for-Template-Designers.markdown @@ -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 -- 1.7.2.5