Symfony Templates Cookbook
Template tags
`{{ ... }} enclose variables. Object properties are referenced with dot notation: {{obj.prop}}. Functions can be put in tags too.
Filters can be applied with the pipe character: {{ title|upper }}.
{% ... %}` encloses logic.
<ul id="navigation">
{% for item in navigation %}
<li><a href="{{ item.href }}">{{ item.caption }}</a></li>
{% endfor %}
</ul>
{# ... #} encloses comments.[1]
Notes
- ↑ Creating and Using Templates, Symfony documentation