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
1 2 3 4 5 6 7 8 |
<?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.
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!
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!