Skip to content

[TwigComponent] Impossible to declare higher level component content block #844

Closed
@norkunas

Description

@norkunas

So I have a component A which defines it's content block. Then I have a higher level component B which also defines it and to forward to the A component, but Twig says: The block 'content' has already been defined line 6.

{# A.html.twig #}
<{{ element }} class="{{ classes }}"{{ attributes }}>
  {%- block content -%}{%- endblock -%}
</{{ element }}>
{# B.html.twig #}
<twig:A>
  {%- block content -%}{%- endblock -%}
</twig:A>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions