1

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>
asked Oct 14, 2019 at 12:58

2 Answers 2

3

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>
answered Oct 14, 2019 at 13:33
1
  • 1
    Thank you Kishan Commented Oct 14, 2019 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>
answered Oct 14, 2019 at 13:24

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.