2 deleted 110 characters in body
source | link

I'm trying to create a container inside page.wrapper to contain some custom blocks for my checkout page.

When I try the following in app/design/frontend/MyTheme/myname/Magento_Theme/layout/checkout_index_index.xml

app/design/frontend/MyTheme/myname/Magento_Theme/layout/checkout_index_index.xml

    <body>
    <referenceContainer name="logo-container">
        <referenceBlock name="onestepcheckout-logo" remove="true" />
    </referenceContainer>
    <referenceContainer name="page.wrapper">
        <container name="footer-custom3" as="footer" after="main.content" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" >
 
        </container>
 
    </referenceContainer>
    </body>

I get an error that

Exception #0 (Magento\Framework\Exception\LocalizedException): The 'footer-custom3' is not a child of 'page.wrapper'.

Exception #0 (Magento\Framework\Exception\LocalizedException): The 'footer-custom3' is not a child of 'page.wrapper'.

How do I make it a child of page.wrapperpage.wrapper?

Also if I use it as a child of main.content as in the following it shows up

        <referenceContainer name="main.content">
        <container name="footer-custom3" as="footer" after="main.content" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" >
            <block class="CleverSoft\Base\Block\Template" name="footer_block" template="html/footer.phtml">
                <block class="Magento\Store\Block\Switcher" name="footer.store_switcher" template="switch/stores.phtml" />
                <block class="Magento\Newsletter\Block\Subscribe" name="footer.newsletter" template="subscribe_footer.phtml" />
            </block>
        </container>
 
    </referenceContainer>

Could someone explain to me why this is not working for page.wrapperpage.wrapper?

I'm trying to create a container inside page.wrapper to contain some custom blocks for my checkout page.

When I try the following in app/design/frontend/MyTheme/myname/Magento_Theme/layout/checkout_index_index.xml

    <body>
    <referenceContainer name="logo-container">
        <referenceBlock name="onestepcheckout-logo" remove="true" />
    </referenceContainer>
    <referenceContainer name="page.wrapper">
        <container name="footer-custom3" as="footer" after="main.content" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" >
 
        </container>
 
    </referenceContainer>
    </body>

I get an error that

Exception #0 (Magento\Framework\Exception\LocalizedException): The 'footer-custom3' is not a child of 'page.wrapper'.

How do I make it a child of page.wrapper?

Also if I use it as a child of main.content as in the following it shows up

        <referenceContainer name="main.content">
        <container name="footer-custom3" as="footer" after="main.content" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" >
            <block class="CleverSoft\Base\Block\Template" name="footer_block" template="html/footer.phtml">
                <block class="Magento\Store\Block\Switcher" name="footer.store_switcher" template="switch/stores.phtml" />
                <block class="Magento\Newsletter\Block\Subscribe" name="footer.newsletter" template="subscribe_footer.phtml" />
            </block>
        </container>
 
    </referenceContainer>

Could someone explain to me why this is not working for page.wrapper?

I'm trying to create a container inside page.wrapper to contain some custom blocks for my checkout page.

When I try the following in

app/design/frontend/MyTheme/myname/Magento_Theme/layout/checkout_index_index.xml

<body>
    <referenceContainer name="logo-container">
        <referenceBlock name="onestepcheckout-logo" remove="true" />
    </referenceContainer>
    <referenceContainer name="page.wrapper">
        <container name="footer-custom3" as="footer" after="main.content" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" >
        </container>
    </referenceContainer>
</body>

I get an error that

Exception #0 (Magento\Framework\Exception\LocalizedException): The 'footer-custom3' is not a child of 'page.wrapper'.

How do I make it a child of page.wrapper?

Also if I use it as a child of main.content as in the following it shows up

<referenceContainer name="main.content">
    <container name="footer-custom3" as="footer" after="main.content" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" >
        <block class="CleverSoft\Base\Block\Template" name="footer_block" template="html/footer.phtml">
            <block class="Magento\Store\Block\Switcher" name="footer.store_switcher" template="switch/stores.phtml" />
            <block class="Magento\Newsletter\Block\Subscribe" name="footer.newsletter" template="subscribe_footer.phtml" />
        </block>
    </container>
</referenceContainer>

Could someone explain to me why this is not working for page.wrapper?

1
source | link

error when creating a new container inside page.wrapper in magento2

I'm trying to create a container inside page.wrapper to contain some custom blocks for my checkout page.

When I try the following in app/design/frontend/MyTheme/myname/Magento_Theme/layout/checkout_index_index.xml

    <body>
    <referenceContainer name="logo-container">
        <referenceBlock name="onestepcheckout-logo" remove="true" />
    </referenceContainer>
    <referenceContainer name="page.wrapper">
        <container name="footer-custom3" as="footer" after="main.content" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" >

        </container>

    </referenceContainer>
    </body>

I get an error that

Exception #0 (Magento\Framework\Exception\LocalizedException): The 'footer-custom3' is not a child of 'page.wrapper'.

How do I make it a child of page.wrapper?

Also if I use it as a child of main.content as in the following it shows up

        <referenceContainer name="main.content">
        <container name="footer-custom3" as="footer" after="main.content" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" >
            <block class="CleverSoft\Base\Block\Template" name="footer_block" template="html/footer.phtml">
                <block class="Magento\Store\Block\Switcher" name="footer.store_switcher" template="switch/stores.phtml" />
                <block class="Magento\Newsletter\Block\Subscribe" name="footer.newsletter" template="subscribe_footer.phtml" />
            </block>
        </container>

    </referenceContainer>

Could someone explain to me why this is not working for page.wrapper?