I need to add multiple blocks in my template, every with different name.
{% for item from items %}
{% block item.name %}sometext{% endblock %}
{% endfor %}
But I get error. How can I do this ?
In
You can load blocks dynamically using the block
function.
{% for item in items %}
{{ block( item.name )|raw }}
{% endfor %}