How to create menu section title in adminhtml?

How to create menu section title in adminhtml?



I want to add section (menu items group) into adminhtml menu in Magento 2. Something like this:



adminhtml menu sesions



I've added file ./etc/adminhtml/menu.xml with:


./etc/adminhtml/menu.xml


<?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_Module::section"
title="Section"
translate="title"
module="Vendor_Module"
sortOrder="50"
resource="Vendor_Module::section"/>
</menu>
</config>



but I cannot see new section in the adminhtml menu.





Can you please update your whole menu.xml code?
– Rutvee Sojitra
Aug 22 at 12:31




3 Answers
3



please update your menu.xml like below:


<?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_Module::section" title="Section" module="Vendor_Module" sortOrder="50" resource="Vendor_Module::section"/>
<add id="Vendor_Module::section-subsection" title="Section" module="Vendor_Module" sortOrder="50" resource="Vendor_Module::section" action="section/index/index" parent="Vendor_Module::section"/>
</menu>
</config>



If is still not display please confirm that your module is enable



Please add like this in menu.xml


<menu>
<add id="Test_Menu::parent" title="Menu" module="Test_Menu" sortOrder="100" resource="Test_Menu::parent"/>
<add id="Test_Menu::test" title="First Menu" module="Test_Menu" sortOrder="11" action="router/controller/action" resource="Test_Menu::test" parent="Test_Menu::parent"/>





Add this below the <add> tag


<add>


<add id="Vendor_Module::section2"
title="Section2"
translate="title2"
module="Vendor_Module"
sortOrder="55"
parent="Vendor_Module::section" action="vendor/module"
resource="Vendor_Module::section"/>






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)