1

I would like to update the title of "Privacy and Cookie Policy" link displays on footer store (for example to translate this title in French).

The articles that I consulted talk about older versions of Magento thus not applicable for my problem.

Any ideas ?

Thanks in advance.

2 Answers 2

1

You can add this to /your_theme/layout/default.xml .

<referenceContainer name="footer">
    <referenceBlock name="privacy-policy-link">
        <arguments>
            <argument name="label" xsi:type="string">My Privacy and Cookie Policy</argument>
            <argument name="path" xsi:type="string">my-privacy-policy-cookie-restriction-mode</argument>
        </arguments>
    </referenceBlock>
</referenceContainer>
3
  • This is the content of my layout.xml : <referenceContainer name="footer"> <block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" after="footer_links" template="switch/stores.phtml"/> </referenceContainer> I try to add your XML block without success ! Mar 30, 2016 at 13:59
  • I found ! it has to edit the C:\wamp\www\magento2\vendor\magento\module-cms\view\frontend\layout/default.xml + clear the cache of Magento (Admin) Mar 30, 2016 at 14:31
  • awesome. glad you got it figured out. Mar 31, 2016 at 3:42
0

I believe the original answer is outdated. Here's where you'd put the new definition.

app/design/frontend/{Vendor}/{theme}/Magento_Cms/layout/default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="privacy-policy-link">
            <arguments>
                <argument name="label" xsi:type="string">Privacy Policy</argument>
                <argument name="path" xsi:type="string">privacy-policy</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.