Magewire not detecting detached layout block #173
Replies: 1 comment
-
|
He @denistrator, good question. So Magewire by default only mounts Magewire components based on their block arguments in layout xml. This is the default way, but there is an option to be able to mount a Magewire component in a different way using Component Resolvers. Now this feature requires a little more in-depth knowledge of the Magewire lifecycle. However, while working on Magewire V3, this is also something that will be migrated in Magewire V3 also, so something to stay and therefor I can recommend it. More info can you found here: https://github.com/magewirephp/magewire/blob/main/docs/Features.md#component-resolvers Let me know if you have any questions regarding this, happy to help. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Natively, I can declare a block in layout w/o any parent containers (of course, in this case it won't be rendered). But after that I can take this block and render it manually. For example, this is the situation that Hyva uses in
\Hyva\Theme\Model\Modal\ModalBuilderInterface::withBlockName. If I declare a detached Magewire block the module won't detect it and\Magewirephp\Magewire\Model\LayoutRenderLifecycle::getViewsis not taking care of the block.What are your thoughts on this issue?
Beta Was this translation helpful? Give feedback.
All reactions