3

I'm trying to append a block to the footer but only on the dashboard page i.e.

<footer>
[New Template]
[Core Content]
</footer>

How can I achieve this? I've tried a layout file with the following but nothing is displayed:

<?xml version="1.0"?>
<layout version="0.1.0">
    <adminhtml_dashboard_index>
        <reference name="footer">
        <block type="core/text_list" name="newreference" as="newreference" translate="label">
            <label>New Reference</label>
        </block>
        </reference>
        <reference name="newreference">
        <block type="core/template" name="newreferenceblock" template="stats.phtml" />
        </reference>
    </adminhtml_dashboard_index>
</layout>

Do I have the path or reference name wrong?

2

Yes it is possible to append a block to the footer in admin dashboard. For that you have to simply override a default.xml file from below path :

vendor/magento/module-backend/view/adminhtml/layout/default.xml

After that you can simply made changes with this section :

       <container name="legal" htmlTag="div" htmlClass="footer-legal">
            <container name="legal.copyright" htmlTag="p" htmlClass="copyright col-m-6">
                <block class="Magento\Backend\Block\Page\Copyright" name="copyright" as="copyright" />
            </container>
            <container name="legal.system" htmlTag="div" htmlClass="footer-legal-system col-m-6">
                <block class="Magento\Backend\Block\Page\Footer" name="version" as="version" />
                <block class="Magento\Framework\View\Element\Template" name="report" as="report" template="Magento_Backend::page/report.phtml">
                    <arguments>
                        <argument name="bugreport_url" xsi:type="string">https://github.com/magento/magento2/issues</argument>
                    </arguments>
                </block>
            </container>
        </container>

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.