Magento 2.0.2 : How to update the title of “Privacy and Cookie Policy” link displays on footer store?
-
29-09-2020 - |
Question
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.
Solution
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>
OTHER TIPS
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>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange