cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the order of tabs in Magento 2 mobile menu

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

How to change the order of tabs in Magento 2 mobile menu

I have added a new section to the `navigation-sections` block in the header, so that I can include it in the mobile menu. The element is displayed correctly, but I cannot change the order of the tabs, to have a new "Welcome" tab show first (by default it shows last). Is there a way of ordering group items?

 

<block class="Magento\Framework\View\Element\Template" name="store.mobile-welcome" group="navigation-sections" template="Magento_Theme::html/container.phtml" before="store.menu">
    <arguments>
        <argument name="title" translate="true" xsi:type="string">Welcome</argument>
        <argument name="priority" xsi:type="string">1</argument>
    </arguments>
    <block class="Magento\Framework\View\Element\Template" name="store.mobile-welcome-message" template="Magento_Theme::html/mobile-welcome.phtml" />
</block>

 

I have tried using `before="store.menu"` and passing a `priority` argument, and neither are working.