My existing code creates a menu that looks like this.
But I want a menu that is a sub-menu of the Catalog menu.
Here is my existing code in adminhtml.xml
<?xml version="1.0" ?>
<config>
<menu>
<mycustom_menu translate="title" module="brands">
<title>My Custom Menu Item</title>
<sort_order>300</sort_order>
<children>
<!-- child items go here -->
<subitem translate="title" module="brands">
<title>Manage Brands</title>
<sort_order>10</sort_order>
<action>adminhtml/mycustom_controller/</action>
</subitem>
</children>
</mycustom_menu>
</menu>
<acl>
<resources>
<admin>
<children>
<mycustom_menu translate="title" module="brands">
<title>My Custom Menu Item</title>
<sort_order>300</sort_order>
<children>
<subitem translate="title" module="brands">
<title>Subitem</title>
<sort_order>10</sort_order>
</subitem>
</children>
</mycustom_menu>
</children>
</admin>
</resources>
</acl>
</config>
Instead of using <mycustom_menu>
you need to re-use the nodename that was used in the adminhtml.xml
of the catalog module. That name is catalog
.
So your XML should look like:
<?xml version="1.0"?>
<config>
<menu>
<catalog>
<children>
<your_subitem>
<title>Subitem 1</title>
<sort_order>10</sort_order>
<action>adminhtml/your_action</action>
</your_subitem>
</children>
</catalog>
</menu>
<acl>
<resources>
<admin>
<children>
<catalog>
<title>Subitem 1</title>
<sort_order>10</sort_order>
</catalog>
</children>
</admin>
</resources>
</acl>
</config>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With