From 91884280e221826b50431078972d4c460727947d Mon Sep 17 00:00:00 2001 From: DanyaPostfactum Date: Mon, 24 Jun 2013 18:41:57 +1000 Subject: [PATCH] More stuff for twig sample --- demo/kitchen-sink/docs/html.html | 1 + demo/kitchen-sink/docs/twig.twig | 35 +++++++++++++++++++++++++------- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/demo/kitchen-sink/docs/html.html b/demo/kitchen-sink/docs/html.html index a3a566ff..81398bef 100644 --- a/demo/kitchen-sink/docs/html.html +++ b/demo/kitchen-sink/docs/html.html @@ -1,3 +1,4 @@ + diff --git a/demo/kitchen-sink/docs/twig.twig b/demo/kitchen-sink/docs/twig.twig index 120f33e9..02214f09 100644 --- a/demo/kitchen-sink/docs/twig.twig +++ b/demo/kitchen-sink/docs/twig.twig @@ -1,9 +1,30 @@ -{% autoescape true %} - {{ var }} - {{ var|raw }} {# var won't be escaped #} - {{ var|escape }} {# var won't be doubled-escaped #} -{% endautoescape %} + + + + My Webpage + + + -{{ include('twig.html', sandboxed = true) }} + {% if 1 not in [1, 2, 3] %} -{{"string #{with} \" escapes" 'another#one' }} \ No newline at end of file + {# is equivalent to #} + {% if not (1 in [1, 2, 3]) %} + + {% autoescape true %} + {{ var }} + {{ var|raw }} {# var won't be escaped #} + {{ var|escape }} {# var won't be doubled-escaped #} + {% endautoescape %} + + {{ include('twig.html', sandboxed = true) }} + + {{"string #{with} \" escapes" 'another#one' }} +

My Webpage

+ {{ a_variable }} + + \ No newline at end of file