update
Former-commit-id: bdede6ed1b6f578f2ef046c338caf02d0b29d453 [formerly 7187de361b53e9c8ec121df379b762f2db736ea2] Former-commit-id: 447d58460fbbfd05ffe08428a1288e392637561d
This commit is contained in:
30
_embed/public/ace/demo/kitchen-sink/docs/twig.twig
Normal file
30
_embed/public/ace/demo/kitchen-sink/docs/twig.twig
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>My Webpage</title>
|
||||
</head>
|
||||
<body>
|
||||
<ul id="navigation">
|
||||
{% for item in navigation %}
|
||||
<li><a href="{{ item.href|escape }}">{{ item.caption }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% if 1 not in [1, 2, 3] %}
|
||||
|
||||
{# 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' }}
|
||||
<h1>My Webpage</h1>
|
||||
{{ a_variable }}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user