1

Is there a way to "delete" all current footer content, and put a single cms block in there?

I want to manage all its content in a simple cms block. Designing a custom footer seems to be very complicated when using the regular xml.

1

1 Answer 1

0

Try this layout in your module

add default.xml in your module app\code\Vendorname\Modulename\view\frontend\layout\default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="footer" remove="true">
        <referenceContainer name="footer-container">
            <block class="Magento\Cms\Block\Block" name="your_footer_cms_block_id">
                <arguments>
                    <argument name="block_id" xsi:type="string">your_footer_cms_block_id</argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.