Cookies setting

Cookies help us enhance your experience on our site by storing information about your preferences and interactions. You can customize your cookie settings by choosing which cookies to allow. Please note that disabling certain cookies might impact the functionality and features of our services, such as personalized content and suggestions. Cookie Policy

Cookie Policy
Essential cookies

These cookies are strictly necessary for the site to work and may not be disabled.

Information
Always enabled
Advertising cookies

Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.

Information
Analytics cookies

Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.

Information
mageplaza.com

How to change default icon for top level menu backend in Magento 2

Vinh Jacker | 12-06-2016

How to change default icon for top level menu backend

Have you ever wondered about how to customize the icon in the top level menu in backend? Actually, you can change the default icon when adding your custom menu. Some companies and developers will also like to adapt their own icons and menu for all of their extensions to make the interface unique with eye-catching visibility. However, this work may need some help with PHP files and non-savvy CMS users may face problems with the customization.

Table Content

Therefore, to help all store owners with the job of changing default icon for top level menu backend in Magento 2, following steps:

Step 1: Create the icon folder file

  • Go to lib/web/fonts
  • Create your module folder
  • Injected it inside Magento 2 without touching the core files
  • Go to app/design/adminhtml/Magento/backend
  • Create folder dubbed Package_Modulename/web/css/source/
  • Create _module.less file in a source folder.

Step 2: Insert the script

  • Add the following lines inside file _module.less:
@modulename-icons-admin__font-name-path: '@{baseDir}fonts/modulename/icomoon';
@modulename-icons-admin__font-name : 'modulename';
.font-face(
@family-name:@modulename-icons-admin__font-name,
@font-path: @modulename-icons-admin__font-name-path,
@font-weight: normal,
@font-style: normal
);
.admin__menu .item-modulename.parent.level-0 > a:before {
  font-family: @modulename-icons-admin__font-name;
  content: "\e800";
}
  • Save it and you have finished managing the top level menu Backend in Magento 2

Related Post

x
    Jacker

    Jacker is the Chief Technology Officer (CTO) at Mageplaza, bringing over 10 years of experience in Magento, Shopify, and other eCommerce platforms. With deep technical expertise, he has led numerous successful projects, optimizing and scaling online stores for global brands. Beyond his work in eCommerce development, he is passionate about running and swimming.



    Related Post

    Website Support
    & Maintenance Services

    Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.

    Get Started
    mageplaza services