ux
ux copied to clipboard
[TwigComponent] two levels of nesting do not work
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