Magento 2 XML – Set Custom External Link in Footer

linkmagento2xml

How can I set a custom external link in the footer?

Something like blog.example.com with the label of "Blog"
<a href="blog.example.com">Blog</a>

I have added other links to my footer via this way.

<referenceBlock name="footer">
            <block class="Magento\Cms\Block\Block" name="footer_social_links_block">
                <arguments>
                    <argument name="block_id" xsi:type="string" translate="true">dth_footer_social_links</argument>
                </arguments>
            </block>
</referenceBlock>

I am using Magento 2.0.7 right now.

What if I use this block instead? How could I link externally from this? I setup a returns-policy link already – but it is internal.

Returns and Exchanges
returns-policy

Best Answer

You can add it by default way

<referenceBlock name="footer_links">
    <block class="Magento\Framework\View\Element\Html\Link\Current" name="footer_blog_link" before="-">
        <arguments>
            <argument name="label" xsi:type="string" translate="true">Blog</argument>
            <argument name="path" xsi:type="string">http://blog.example.com</argument>
        </arguments>
    </block>
</referenceBlock>
Related Topic