What is the use of pagebuilder.widget.initializer on frontend
-
17-03-2021 - |
Domanda
vendor/magento/module-page-builder/view/frontend/layout/default.xml
I have checked the above file and see
<referenceContainer name="after.body.start">
<block class="Magento\PageBuilder\Block\GoogleMapsApi" name="google.maps.api" template="Magento_PageBuilder::googlemaps.phtml" />
</referenceContainer>
<referenceBlock name="head.components">
<block class="Magento\PageBuilder\Block\WidgetInitializer" name="pagebuilder.widget.initializer" template="Magento_PageBuilder::widget_initializer.phtml" />
</referenceBlock>
Soluzione
A storefront widget is a JavaScript component that handles the behavior of a content type after Page Builder renders it on the storefront. For example, the Tabs and Sliders have their own storefront widgets to handle the end-user’s tapping of tabs and swiping of slides on the storefront.
You can use this to specify places in which you want to insert page builder elements
https://devdocs.magento.com/page-builder/docs/how-to/how-to-add-storefront-widget.html
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange