2

I want to change the name of the 'My Downloadable Products' page to 'Recipes'. I want this to be changed in the navigation, and the page title.

Is there a way to achieve this, other than to translate the string?

2 Answers 2

2

For change navigation title in customer account,

app/design/frontend/Vendorname/themename/Magento_Downloadable/layout/customer_account.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="customer-account-navigation-downloadable-products-link">             
            <arguments>
                <argument name="path" xsi:type="string">downloadable/customer/products</argument>
                <argument name="label" xsi:type="string">Recipes</argument>
            </arguments>            
        </referenceBlock>
    </body>
</page>

app/design/frontend/Vendorname/themename/Magento_Downloadable/layout/downloadable_customer_products.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">
   <head>
     <title>Recipe</title>
   </head>
</page>
5
  • The menu item did change to Recipe, but the page title is still the same :/ Mar 24, 2017 at 11:05
  • i have updated answer please check. Mar 24, 2017 at 11:08
  • I meant the page title :p Mar 24, 2017 at 11:23
  • @RakeshJesadiya These files should go in app|code|Vendorname|Themename|view|frontend|layout, isn't it? Mar 24, 2017 at 11:24
  • yes correct path is, Magento_Downloadable/layout/ Mar 24, 2017 at 11:28
0

To change the page title: app/design/frontend/Vendor/Theme/Magento_Downloadable/layout/downloadable_customer_products.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="page.main.title">
            <action method="setPageTitle">
                <argument translate="true" name="title" xsi:type="string">Recipe</argument>
            </action>
        </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.