{%
Twig Playground
Rendered in 23ms
Reset
Variables
JSON
{ "text": "demo", "items": [ { "name": "A" }, { "name": "B" } ] }
Templates
First file renders; others can be included
index.html.twig
entry
×
some-file.html.twig
entry
×
+ File
<h1>{{ text | title }}</h1> <ul> {% for item in items %} <li>{{ item.name }}</li> {% endfor %} </ul> {% include 'some-file.html.twig' %}
<p>{{ items | length }} items</p>
Preview
Updates as you type
HTML output
Copy
<h1>Demo</h1> <ul> <li>A</li> <li>B</li> </ul> <p>2 items</p>