Here are some quick tips for Twig for beginner

Rendering HTML in twig template with Twig

By default whenever you try to pass an HTML string to Twig, it applies a function like html_entities(),
opening bracket < will be displayed as
&lt; , so if you want to render the HTML you should use the raw filter like this:

{{ html_string| raw }}

Echoing an array

{{  dump(products) }}


Posté le 2015-01-21 00:00:00

0 Commentaires

Fermé aux commentaires