ux icon indicating copy to clipboard operation
ux copied to clipboard

[TwigComponent] two levels of nesting do not work

Open tito10047 opened this issue 7 months ago • 2 comments

Hi, I have this situation:

{# components/Body.html.twig #}
<body{{ attributes }}>
    <main class="app-main">
        {% block content %}{% endblock %}
    </main>
</body>
{# base.html.twig #}
<!DOCTYPE html>
<html>
<head>
</head>
<twig:Body>
    {{ block(outerBlocks.body) }}
</twig:Body>
</html>
{# layout.html.twig #}
{% extends "base.html.twig" %}

{% block body %}
    {{ block(outerBlocks.container) }} {# this not work #}
    {% block container %}{% endblock %} {# this also not work #}
{% endblock %}
{# index.html.twig #}
{% extends "layout.html.twig" %}

{% block container %}
    This block is not rendered
{% endblock %}

When i want render index.html.twig then container block is not rendered

Any idea how to render this block ? Thanks

tito10047 avatar Jul 03 '24 12:07 tito10047