Documented if-conditional changes.
authorArmin Ronacher <armin.ronacher@active-4.com>
Fri, 4 Jul 2008 15:00:38 +0000 (17:00 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Fri, 4 Jul 2008 15:00:38 +0000 (17:00 +0200)
--HG--
branch : trunk

docs/templates.rst

index 9eb547da55cc90b0438d7d71371fbd0d8d993626..e2af7a7945cae265b6ca58eba30d59710ff61eea 100644 (file)
@@ -952,6 +952,11 @@ variable is defined, otherwise from the default layout template::
 The general syntax is ``<do something> if <something is true> else <do
 something else>``.
 
+The `else` part is optional.  If not provided the else block implicitly
+evaluates into an undefined object::
+
+    {{ '[%s]' % page.title if page.title }}
+
 
 .. _builtin-filters: