How to add submenu into the main menu of the different module in admin panel


First of all, find out menu id of the existing module from


Now use this menu id as parent to show your menu as a submenu of main module menu

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
        <add action="Vendor_Module/action/index" id="Vendor_Module::my_id" module="Vendor_Module" parent="Vendor_ModuleOne::module_one_id" resource="Vendor_ModuleOne::module_one_resource" title="My SubMenu"/>

Create menu.xml file at app/code/VendorName/ModuleName/etc/adminhtml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Magento/Backend/etc/menu.xsd">

        <add id="Vendor_Module::view" title="Vendor Module" module="Vendor_Module" sortOrder="11" resource="Vendor_Module::view" parent="Magento_Catalog::catalog"/>

        <add id="Vendor_Module::manage" title="Manage Module" module="Vendor_Module" sortOrder="11" parent="Vendor_Module::view" action="module/index/index" resource="Vendor_Module::manage"/>        

First <add> tag is about sub-menu title & second <add> tag is about sub-menu.

This menu will create under catalog menu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.