From 7b3b89301833aff8c71234b0691007d17844aad9 Mon Sep 17 00:00:00 2001 From: fabien Date: Sun, 13 Dec 2009 12:34:04 +0000 Subject: [PATCH] added some missing literals in the doc git-svn-id: http://svn.twig-project.org/trunk@166 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- doc/02-Twig-for-Template-Designers.markdown | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/doc/02-Twig-for-Template-Designers.markdown b/doc/02-Twig-for-Template-Designers.markdown index 2fe90ff..585c07d 100644 --- a/doc/02-Twig-for-Template-Designers.markdown +++ b/doc/02-Twig-for-Template-Designers.markdown @@ -61,7 +61,8 @@ same:: >but the print statement. If you access variables inside tags don't put the >braces around. -If a variable or attribute does not exist you will get back a `null` value. +If a variable or attribute does not exist you will get back a `null` value +(which can be testes with the `none` expression). >**SIDEBAR** >Implementation @@ -664,6 +665,12 @@ exist: can be any valid expression, arrays can be nested. The array notation is only available as of Twig 0.9.5. + * `true` / `false` / `none`: `true` represents the true value, `false` + represents the false value. + + * `none`: `none` represents no specific value (the equivalent of `null` in + PHP). This is the value returned when a variable does not exist. + ### Math Twig allows you to calculate with values. This is rarely useful in templates -- 1.7.2.5