cancel
Showing results for 
Search instead for 
Did you mean: 

Overwrite parrents settings in Pagebuilder

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?

1 REPLY 1

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