0

In my mobile menu the first says "All Info" - see screenshot. How can I change this to simply "Info" and have the same font as "Sub Category 2" ?

enter image description here

  • Please provide code, without any code people wont be able to help you. – andy jones Sep 2 '17 at 10:28
  • It's the standard code. Magento always put the word "All" in the front. – bondimedical Sep 2 '17 at 10:32
1

All word is appended by menu.js located at \vendor\magento\magento2-base\lib\web\mage\menu.js line # 286 by following code :

...

this.categoryLink = $('<a>')
.attr('href', categoryUrl)
.text($.mage.__('All ') + category);

...

So you need to extend this js and update this code by :

...

this.categoryLink = $('<a>')
.attr('href', categoryUrl)
.text(category);

...

For Extending Magento 2 default JS components, check this page

  • And how do I make the font the same as "Sub Category 2"? – bondimedical Sep 2 '17 at 11:42
  • 1
    If you have seen the next line of menu.js, there is a class added for it, i.e. all-category. You can do a CSS using this class – Anil Suthar Sep 2 '17 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.