2

Dear Magento developers,

Currently I am trying to put an element block on the top of Footer, here is my wanted result:

enter image description here

Here is my default.xml

<referenceContainer name="page.bottom.container">
    <block class="Senheng\Def\Block\Html\Subscribe"
        name="mojambe.footer.top"
        template="Senheng_Default::html/footer/subscribe.phtml"/>
</referenceContainer>

unfortunately nothing is showing up on the home page:

enter image description here

Any help would be very appreciated.

  • 1
    Hi everyone, my bad, I just realized that my path is wrong, it should be "Senheng_Default::html/subscribe.phtml' – Yusuf Ibrahim May 15 at 9:38
1

try this code.

<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">
            <block class="Senheng\Def\Block\Html\Subscribe"
        name="mojambe.footer.top"
        template="Senheng_Default::html/footer/subscribe.phtml" before="-"/>
        </referenceContainer>
    </body>
</page>

Run the caching, deploy and upgrade commadn and then check.

  • Hi mate, thank for response, I just realized that my path is wrong, it should be "Senheng_Default::html/subscribe.phtml' – Yusuf Ibrahim May 15 at 9:37

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.