sw-block-parent
WARNING
Single File Component (SFC) support for Administration extensions is experimental. It is available since Shopware 6.7.16.0. The APIs described on this page can still change without a deprecation. Try it out and tell us what you find, but do not ship an extension built on it to customers or to the Shopware Store until the API is declared stable (planned for 6.9).
<sw-block-parent />Takes no props. Renders whatever the extension point held before this override: the default content, or the previous override in the chain. Globally registered, so you write the tag without importing anything.
Leave it out and the original markup is replaced.
Position decides yours
<!-- append -->
<sw-block extends="swag_greeting_card_body">
<sw-block-parent />
<p>I go after</p>
</sw-block>
<!-- prepend -->
<sw-block extends="swag_greeting_card_body">
<p>I go before</p>
<sw-block-parent />
</sw-block>
<!-- replace -->
<sw-block extends="swag_greeting_card_body">
<p>The original content is gone</p>
</sw-block>Render it once, unconditionally
It claims its position in the chain when it is created, so a v-if on it, or a v-for around it, corrupts that chain. One <sw-block-parent /> per extending block, always rendered.
Chains
When several overrides target one block they stack, and each one's <sw-block-parent /> renders the previous one's output rather than the original default. That is what keeps other plugins on the page when your own change is additive.