- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Overwrite parrents settings in Pagebuilder
Hi i want to have the column element as a child of my Custom component. Sadly i cant add it because in the config file are the allowed parrents defined.
<parents default_policy="deny">
<parent name="root-container" policy="allow"/>
<parent name="row" policy="allow"/>
<parent name="column-group" policy="allow"/>
<parent name="tab-item" policy="allow"/>
</parents>
how can i overwrite this setting to use the row in my component?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Overwrite parrents settings in Pagebuilder
Hello @apselcomme6d1b
Modify or Create a Custom Layout XML
If you want to modify or override the default layout settings for your component to place it inside the row container, you can use a custom layout XML file.
Here’s how you can use the row container as the parent for your block. You will reference the row container in your layout XML, and add your custom block within it.
<referenceContainer name="row"> <block class="Vendor\Module\Block\CustomBlock" name="vendor.module.custom.block" template="Vendor_Module::custom.phtml" /> </referenceContainer>
After you’ve modified the layout XML, you need to flush the cache and redeploy static content to ensure the changes are applied:
php bin/magento cache:flush
php bin/magento setup:static-content:deploy
Hope it helps !
If you find our reply helpful, please give us kudos.
A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.
WebDesk Solution Support Team
Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Location: 150 King St. W. Toronto, ON M5H 1J9
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Overwrite parrents settings in Pagebuilder
To overwrite the parent settings in PageBuilder and allow your custom component to use the row element as a child, you will need to adjust the configuration. Modify the config.xml file for your component and add a new parent with the desired settings, like so:
By adding the row as an allowed parent, you should be able to use it within your custom component. Ensure that you correctly configure the component’s structure and test it after applying the changes.