In Magento, it is indeed possible to remove specific items from the Admin Panel navigation menu. This can be accomplished by utilizing the configuration override system. Below, we will explore how to completely suppress an existing menu item, such as the CMS navigation item.
Adding New Items to the Navigation
First, let’s look at how to add a new item to the navigation. The following XML configuration demonstrates how to introduce a new menu item under the CMS section:
<?xml version="1.0"?>
<config>
<modules>
<Company_Module>
<version>0.1.0</version>
</Company_Module>
</modules>
<adminhtml>
<menu>
<cms translate="title" module="cms">
<title>The CMS</title>
<sort_order>70</sort_order>
<children>
<foo translate="title" module="cms">
<title>Foo Item</title>
<action>adminhtml/foo</action>
</foo>
</children>
</cms>
</menu>
</adminhtml>
</config>
Removing Existing Items from the Navigation
To remove an existing item, such as the CMS menu, you can create a configuration file that disables the specific menu item. Here’s how you can achieve that:
- Create or modify the
adminhtml.xmlfile in your module's configuration directory. - Add the following XML structure to disable the CMS menu item:
<?xml version="1.0"?>
<config>
<menu>
<cms>
<disabled>1</disabled>
</cms>
</menu>
</config>
Final Steps
After making these changes, ensure to clear the Magento cache to see the updates reflected in the Admin Panel. This method allows for a clean and efficient way to manage the visibility of menu items in your Magento installation.