I am working on a custom backend module that has an option in System > Configuration to enable or disable the module.

System > Configuration

I would like to know if it is possible to hide the navigation item from the admin dashboard if the module is disabled?

Admin Dashboard

2 Answers 2


There's a good article by Ecomdev that gives an example of how you can do this with the 'depends' functionality. Search for 'depends' on that page and it will demonstrate how to use a config value. e.g.


The menu item will only show if the check payment method is active.


  • This worked perfectly, although there was an error. Should have read <config> instead of <module> Oct 31, 2013 at 10:43
  • Edited, and glad it worked :)
    – Paul
    Oct 31, 2013 at 21:07
  • Mind that this does only work for child entries and not for top-level menu entries.
    – Simon
    Jan 20, 2017 at 9:27
  • perfect!!! +1 :) Jul 3, 2017 at 8:53

The adminhtml.xml and the config.xml are both loaded into the configuration xml (Mage::getSingleton('admin/config')->getAdminhtmlConfig()), so yes sure it is possible.

Mage::getConfig()->loadModulesConfiguration('adminhtml.xml', $adminhtmlConfig);

I think you have two options, either disable the menu in ACL.

Mage::getConfig()->loadModulesConfiguration('adminhtml.xml', $adminhtmlConfig);

or unset the node directly in the config. See \Mage_Adminhtml_Block_Page_Menu::_buildMenuArray

But I think both is not possible at the moment with the API Mage_Admin_Model_Config offers, so you maybe need to rewrite Mage_Admin_Model_Config

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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