Categories

Featured templates

Magento. How to manage the mobile menu and how to edit links in mobile view

Charlotte Bennett April 6, 2015
Rating: 5.0/5. From 3 votes.
Please wait...

In this tutorial we will teach you how to manage the mobile menu and how to edit the links that appear on mobile view in Magento.

Magento. How to manage the mobile menu and how to edit links in mobile view

  1. The mobile menu links in Magento are generated from the header and footer links of the main store view:

    magento_how_to_manage_mobile_links_1

  2. The main code that defines the mobile menu has the class <div class=”swipe”>. It is added to header.phtml file in app/design/frontend/default/themeXXX/template/page/html directory on your server:

    magento_how_to_manage_mobile_menu_2

  3. In this code you can see the main sources which define the menu links on mobile:

    • the Home link is located in the same code of the header.phtml file:

      <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->__('Home') ?>" class="home-link"><?php echo $this->__('Home') ?></a>
    • My Account, My Whishlist, Log In and Log Out menu links can be found in the customer.xml file in app/design/frontend/default/themeXXX/layout directory on your server.

    • My Cart and Checkout links code is in the checkout.xml file in the same directory:

      magento_how_to_manage_mobile_menu_3

    • Check this tutorial for more details on how to manage header links in Magento.

    • the Currency, as well as the Language link, are located in header.phtml file:

      <?php echo $this->getChildHtml('currency_2') ?>
      <?php echo $this->getChildHtml('store_language_2') ?>
    • Note: If you delete these links from the swipe menu code, they will still be displayed on the main store view.

    • About Us, Customer Service and Privacy Policy are Magento static block links which can be edited from admin panel in CMS-> Static blocks->Footer Links section:

      magento_manage_mobile_menu_4

    • Product Sitemap and Category Sitemap links are located in the catalog.xml file in app/design/frontend/default/themeXXX/layout directory.

    • Advanced Search link is in the catalogsearch.xml file in the same directory on your server.

    • Orders and Returns menu item is in sales.xml file in app/design/frontend/default/themeXXX/layout.

      In this tutorial you will see more details about “Orders and Returns” link

    • Check this detailed tutorial on how to manage footer links in Magento.

Deleting links from mobile menu only

Note: If you delete the link from the main file (where it is added originally), it will disappear not only from mobile menu, but from the main store view as well.

  1. In case you want to remove some link only from the mobile view, you would need to create a new CSS @media Query rule.

  2. Inspect the css class of the menu item with the help of Firebug plugin or use some other tool of your browser.

  3. Create a media Query rule depending on the width of your mobile screen width. For example:

    @media screen and (max-width: 765px) {
    	.top-link-blog > a {
    		display: none !important;
    	}
    } 
    			
  4. Add your new rule to the bottom of the responsive.css file in /skin/frontend/default/themeXXX/css folder on your server.

  5. Save the changes and check the updated mobile menu on the front end.

Editing the icons that appear next to mobile menu links

  1. The icons next to menu items are represented by the Fontawesome iconic font icons which are added to a css file with the help of a special class which is unique for each icon.

  2. Inspect the icon class with the help of Firebug plugin or some other developer tool. Usually, the icon classes are added to the styles.css file located in /skin/frontend/default/themeXXX/css folder on your server:

    magento_manage_mobile_menu_5

  3. Find the necessary file on your hosting cpanel or use the FTP to connect to your server. Locate the line you inspected with Firebug and look for the icon class:

    magento_manage_mobile_menu_6

  4. Go to the official Font Awesome site and find the class of your icon.

    magento_manage_mobile_menu_7

  5. In order to change the image, replace the class of the current icon in styles.css with the class of new icon you like from the list of item classes on the official Font Awesome site.

  6. Save your changes and check how the new icon appears on the site front end.

  7. Perform the procedure with the other icons you want to change.

We hope the tutorial was useful for you. Feel free to check the detailed video tutorial below:

Magento. How to manage the mobile menu and how to edit links in mobile view

Magento Website Templates
This entry was posted in Magento Tutorials and tagged links, Magento, menu, mobile. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket