Skip to main content
Code added
Source Link
Henry's Cat
  • 2k
  • 2
  • 16
  • 23

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>
        </action>
        <block class="Magento\Framework\View\Element\Html\Link\Current" name="glossary">
            <arguments>
                <argument name="label" xsi:type="string">Delivery and returns</argument>
                <argument name="path" xsi:type="string">delivery-information</argument>
            </arguments>
        </block>
        <block class="Magento\Framework\View\Element\Html\Link\Current" name="deliveryinfo">
            <arguments>
                <argument name="label" xsi:type="string">Glossary</argument>
                <argument name="path" xsi:type="string">glossary</argument>
            </arguments>
        </block>
    </referenceBlock>

Can anyone help with an elegant solution to this?

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.

Can anyone help with an elegant solution to this?

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>
        </action>
        <block class="Magento\Framework\View\Element\Html\Link\Current" name="glossary">
            <arguments>
                <argument name="label" xsi:type="string">Delivery and returns</argument>
                <argument name="path" xsi:type="string">delivery-information</argument>
            </arguments>
        </block>
        <block class="Magento\Framework\View\Element\Html\Link\Current" name="deliveryinfo">
            <arguments>
                <argument name="label" xsi:type="string">Glossary</argument>
                <argument name="path" xsi:type="string">glossary</argument>
            </arguments>
        </block>
    </referenceBlock>

Can anyone help with an elegant solution to this?

Source Link
Henry's Cat
  • 2k
  • 2
  • 16
  • 23

Magento 2 add title to footer links block

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.

Can anyone help with an elegant solution to this?