-
-
Notifications
You must be signed in to change notification settings - Fork 394
Description
Let's assume two component foo and bar, which both define a content block.
Using the normal syntax, it works as expected:
{% component foo %}
{% block content %}
{% component bar %}
{% block content %}
{# ... #}
{% endblock %}
{% endcomponent %}
{% endblock %}
{% endcomponent %}But using the html syntax:
<twig:foo>
<twig:block name="content">
<twig:bar>
<twig:block name="content">
{# ... #}
</twig:block>
</twig:bar>
</twig:block>
</twig:foo>This throw a SyntaxError:
An exception has been thrown during the compilation of a template ("Expected closing tag '</twig:block>' for block 'content' at line 13").
Btw, simply write it like this doesn't work too:
<twig:foo>
<twig:bar>
{# ... #}
</twig:bar>
</twig:foo>This one throw:
A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag?
But maybe it is how it is expected to work?
Metadata
Metadata
Assignees
Labels
No labels