0

In my magento2 based website I have a static block that i want to load right before the footer block but below the main content of the page. I have tried the below but that did not seem to make it load anywhere. I also tried replacing the name value in the referenceContainer to footer but then that put the static block inside the footer which is not what I want because I want/need this static block to be full width of the page and not contained within any other div.

thoughts on how to achieve this?

<referenceContainer name="page.main">
<block class="Magento\Cms\Block\Block" name="muah_landingpg_footer_banner" after="-">
    <arguments>
        <argument name="block_id" xsi:type="string">muah_landingpg_footer_banner</argument>
    </arguments>
</block>

2

Can you please try this ?

<referenceContainer name="page.wrapper">
    <block class="Magento\Cms\Block\Block" name="muah_landingpg_footer_banner" before="page.bottom">
        <arguments>
            <argument name="block_id" xsi:type="string">muah_landingpg_footer_banner</argument>
        </arguments>
    </block>
</referenceContainer>
  • 1
    Thank you Kishan – Jayreis Oct 14 '19 at 13:54
0

Try with container page.bottom. Take a look at vendor/magento/module-theme/view/frontend/layout/default.xml to see more details.

For example:

<referenceContainer name="page.bottom">
    <block class="Magento\Framework\View\Element\Template" name="test.data" template="Vendor_PageLayout::test.phtml"/>
</referenceContainer>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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