I have tried to add a h3 header to the footer links block using the approach outlined here:

Adding title to cms footer block

This looks difficult to maintain and it wasn't quite what I wanted.

I can add a static block with my own links and probably get an easier to maintain solution, however, I would prefer to do it the Magento2 way.

It is possible to specify a template for the links block and I can do this but not be able to pull through the actual links.

        <referenceBlock name="footer_links">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">Magento_Theme::html/custom.phtml</argument>
        <block class="Magento\Framework\View\Element\Html\Link\Current" name="glossary">
                <argument name="label" xsi:type="string">Delivery and returns</argument>
                <argument name="path" xsi:type="string">delivery-information</argument>
        <block class="Magento\Framework\View\Element\Html\Link\Current" name="deliveryinfo">
                <argument name="label" xsi:type="string">Glossary</argument>
                <argument name="path" xsi:type="string">glossary</argument>

Can anyone help with an elegant solution to this?

Your Answer

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

Browse other questions tagged or ask your own question.