I need do a cycle for with an include directive in twig but the template twig will not repeat. This is a snippet of my code:
...
{% for object in objects %}
{% include 'template.html.twig' with {'object':object} %}
{% endfor %}
...
Only the first object is received, but the rest of the objects I need are not received.
The problem had nothing to do with TWIG, the error was in JQUERY. The FOR-LOOP is valid with an INCLUDE inside.
TEMPLATE TWIG 1: print n modals with different contents
TEMPLATE TWIG 2: modal bootstrap