How to Create Admin Menu in Magento 2

How to Create Admin Menu in Magento 2

Hello Magento Friends,

Today I am going to throw light on How to Create Admin Menu in Magento 2.

Magento is at a leading place when it comes to customization. You can customize every bit of the website if you are working with Magento. Magento admin has various menu options that are useful to perform configuration settings on the store frontend. The menu options have submenus and the submenu have further other submenus. You can create your own custom menu on the admin sidebar of your Magento 2 store.

Follow the steps below to Create Admin Menu in Magento 2.

Steps to Create Admin Menu in Magento 2:

Step 1: Create an admin menu file named menu.xml file at the following path

app\code\Vendor\Extension\etc\adminhtml\menu.xml

Now add the below code

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Vendor_Extension::custom_menu" title="Custom Menu" module="Vendor_Extension" sortOrder="50" resource="Vendor_Extension::custom_menu"/>
        <add id="Vendor_Extension::notifications" title="Notifications" module="Vendor_Extension" sortOrder="10" action="vendorextension/notifications" resource="Vendor_Extension::notifications" parent="Vendor_Extension::custom_menu"/>
        <add id="Vendor_Extension::configuration" title="Configurations" module="Vendor_Extension" sortOrder="100" parent="Vendor_Extension::custom_menu" action="adminhtml/system_config/edit/section/custom_menu" resource="Vendor_Extension::configuration"/>
    </menu>
</config>

Checkout from your Magento Admin. A custom menu will be created as shown in the below image.

admin menu

Conclusion:

Hence, accordingly, you can successfully Create Admin Menu in Magento 2. Alternatively, you can also Hide Admin Menu in Magento 2. If you have any doubts let me know via the comment box without any hesitation. Share the article with your friends and stay in touch!

Happy Reading!

Previous Article

How to Configure Persistent Shopping Cart In Magento 2

Next Article

How to Override Core Plugin Method in Magento 2

Write a Comment
  1. Dear Dhiren,
    Your article is very useful for me to understand and create a customised menu in magento. I have another request from customer, they hope create menu with header which is similar with magento stores menu:
    Settings
    All Stores
    Configuration
    Terms and Conditions
    Order Status
    then we can add our customised menu items under the header. Is there any way to implement it?
    Many thanks!

Leave a Comment

Your email address will not be published. Required fields are marked *

Get Connect With Us

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨