Magento – Magento 2 – Full Width Section

layoutlayout-updatemagento2

If I need to add a new full width section between the main element and the footer element, is there a way to declare something in the theme's default.xml that places it before or after a container?

Best Answer

You can try

<referenceContainer name="content">
    <block class="Myvendor\Mymodule\Block\Myblock" name="unique_name" template="Myvendor_Mymodule::mysection.phtml" after="-" />
</referenceContainer>

Or

<referenceContainer name="after.body.end">
            <block class="Myvendor\Mymodule\Block\Myblock" name="unique_name" template="Myvendor_Mymodule::mysection.phtml" />
    </referenceContainer>

You can use css for custom styles. Hope this helps.

Related Topic