1

I'm trying to find where I change the text of the mobile menu. I want to change the Home/Account section to Home/Accounts & info.

Any suggestions of where I should be looking to edit the file?

Where to change menu

3 Answers 3

2

Create file in app/design/frontend/Vendor/Theme/Magento_Theme/layout/default.xml and put below code in it.

<?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="store.links">
            <arguments>
                <argument name="title" translate="true" xsi:type="string">Account &amp; Info</argument>
            </arguments>
        </referenceBlock>
        <referenceBlock name="store.menu">
            <arguments>
                <argument name="title" translate="true" xsi:type="string">Navigation</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>
1
  • @John Jones, did this work for you? Commented Feb 7, 2019 at 11:02
0

module-theme/view/frontend/layout/default.xml

<block class="Magento\Framework\View\Element\Template" name="store.menu" group="navigation-sections" template="Magento_Theme::html/container.phtml">
    <arguments>
        <argument name="title" translate="true" xsi:type="string">Menu</argument>
    </arguments>
    <block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="Magento_Theme::html/topmenu.phtml" ttl="3600" before="-"/>
</block>
<block class="Magento\Framework\View\Element\Text" name="store.links" group="navigation-sections">
    <arguments>
        <argument name="title" translate="true" xsi:type="string"><![CDATA[Accounts & Info]]></argument>
        <argument name="use_force" xsi:type="boolean">true</argument>
        <argument name="text" xsi:type="string"><![CDATA[<!-- Account links -->]]></argument>
    </arguments>
</block>
0

Go to vendor/magento/module-theme/view/frontend/layout/default.xml

 <block class="Magento\Framework\View\Element\Template" name="store.menu" group="navigation-sections" template="Magento_Theme::html/container.phtml">
   <arguments>
       <argument name="title" translate="true" xsi:type="string">Menu</argument>
   </arguments>
<block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="Magento_Theme::html/topmenu.phtml" ttl="3600" before="-"/>
</block>
<block class="Magento\Framework\View\Element\Text" name="store.links" group="navigation-sections">
   <arguments>
      <argument name="title" translate="true" xsi:type="string">Accounts & info</argument>
      <argument name="use_force" xsi:type="boolean">true</argument>
      <argument name="text" xsi:type="string"><![CDATA[<!-- Account links -->]]> 
      </argument>
  </arguments>
</block>

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.