1

New to Magento. I am trying to merge the content of the two default tabs on mobile view into one tab. Is it possible to add store.links (Account) as a link in the store.menu (Menu) much like the Industries link?

enter image description here

1
  • Did you find anything? I want to achieve the same thing.
    – Sejal Shah
    Commented Aug 2, 2019 at 13:30

1 Answer 1

3

You can do this with simple JS and css code. In Magento Account links are added to Account tab using this piece of code in vendor/magento/theme-frontend-blank/Magento_Theme/web/js/theme.js

$('.panel.header > .header.links').clone().appendTo('#store\\.links');

You can override theme.js file in your custom theme and change the code to

$('.panel.header > .header.links').clone().appendTo('#store\\.menu');

So the account links are now available in Menu Tab. To remove the tab like structure you can add this css code

@media only screen and (max-width: 767px) {
.nav-sections .nav-sections-item-title {
    display: none;
}
.nav-sections-item-content {
  margin-top: 0;
  padding-top: 0;
}
}

Menu tab is by default active.

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.