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
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>
-
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 !Fabrice MAUPIN– Fabrice MAUPIN2016年03月30日 13:59:12 +00:00Commented 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)Fabrice MAUPIN– Fabrice MAUPIN2016年03月30日 14:31:03 +00:00Commented Mar 30, 2016 at 14:31
-
awesome. glad you got it figured out.Jackie Lowery– Jackie Lowery2016年03月31日 03:42:15 +00:00Commented Mar 31, 2016 at 3:42
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>