0

I am trying to integrate custom template in magento2.1 as well as div container into footer block.

I am using below code in my layout but not working.

<container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" >
    <container name="footerContainer" htmlTag="div" htmlId="cart-container-id" htmlClass="cart-container" before="-">
    </container>
</container>
1

Try below code.

<referenceContainer name="footer-container">
    <container name="footer" as="footer" label="Page Footer" htmlTag="div" htmlClass="footer content">

        <block class="Magento\Framework\View\Element\Html\Links" name="footer_company_links">
            <arguments>
                <argument name="css_class" xsi:type="string">footer links</argument>
            </arguments>
        </block>

        <block class="Magento\Framework\View\Element\Html\Links" name="footer_links" after="footer_company_links">
            <arguments>
                <argument name="css_class" xsi:type="string">footer links</argument>
            </arguments>
        </block>    

        <block class="Magento\Theme\Block\Html\Footer" name="copyright" template="html/copyright.phtml"/>

    </container>
</referenceContainer>

To add extra template

<referenceContainer name="footer">
    <block class="Module\Vendor\Block\Myblock" name="custom-layout" template="test.phtml" ifconfig=""/>
</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.