Skip to content

[TwigComponent] New HTML syntax marked as embedded in all cases - fails for live components #810

Closed
@weaverryan

Description

@weaverryan

Take this component render:

<twig:PackageSearch />

Internally, we remap this to:

{% component PackageSearch %}{% endcomponent%}

The key here is that there is NO content inside of the component: we are not defining any blocks. Even still, ComponentRenderer::embeddedContext() is called, which marks the component as "embedded". And so, trying to use with a live component fails as this is not allowed

@kbond WDYT? We could work around this with the HTML syntax to map self-closing tags to {{ component(...) }}. But it also feels more correct to allow {% component PackageSearch %}{% endcomponent%} to realize that it's not really an "embedded" component.

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