A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearRemoving an Item from Magento's Admin Panel Navigation - page 1
User InfoPosts
Removing an Item from Magento's Admin Panel Navigation#1
Using the Magento Ecommerce system, is is possible to remove an item from the Admin Panel Navigation menu? More generally, is there a way to use the config override system to remove existing elements from a configuration?

I know I can add to the navigation with an override that looks something like this

<?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>


but how would/could I completely suppress the CMS navigation item?

posted date: 2009-04-06 17:12:00


Re: Removing an Item from Magento's Admin Panel Navigation#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-06 17:12:01


Re: Removing an Item from Magento's Admin Panel Navigation#3
You could inject a bogus module dependency into the menu item in your config.xml. In your case,<adminhtml> <menu> <cms translate="title" module="cms"> <depends><module>HideMe</module></depends> </cms> </menu></adminhtml>

posted date: 2009-04-20 12:24:00


Re: Removing an Item from Magento's Admin Panel Navigation#4
Your science impresses me! Will depends work like that in other areas of the config file? I'd only even seen it used to ensure correct module loading order.

posted date: 2009-04-20 14:01:00


Re: Removing an Item from Magento's Admin Panel Navigation#5
It seems to be only for initializing Magento's modules (as you stated) and building the adminhtml menu. Module dependencies seem to be checked in these classes: Mage_Adminhtml_Block_Page_Menu Mage_Adminhtml_Model_Config Mage_Adminhtml_Model_System_Config_Source_Admin_Page Mage_Api_Model_Config Mage_Core_Model_Config

posted date: 2009-04-21 08:00:00


Re: Removing an Item from Magento's Admin Panel Navigation#6
@Alan and @Scott just wondering if either of you found a more elegant way of doing this in the two years since posting. It seems a little ... hacky (no offense intended!). Thanks, JD

posted date: 2011-05-04 20:45:00


Re: Removing an Item from Magento's Admin Panel Navigation#7
I don(t think Alan would still need anyone to ask this question, but for anyone else that might end up reading this, it would be a bit better to use:<adminhtml> <menu> <cms translate="title" module="cms"> <depends><config>some/configuration/flag</config></depends> </cms> </menu></adminhtml>

posted date: 2012-05-24 12:33:00


Re: Removing an Item from Magento's Admin Panel Navigation#8
@JonathanDay It looks like modern version of Magento support a <disabled>1</disabled> node to turn a menu (or ACL rule) on/off.

posted date: 2012-08-08 11:43:00


Re: Removing an Item from Magento's Admin Panel Navigation#9
Cleaner way to do this: Add a adminhtml.xml (e.g. to an existing modules that keeps all other customization stuff, or create a new module)<?xml version="1.0" ?><config> <menu> <xmlconnect> <disabled>1</disabled> </xmlconnect> </menu></config>

posted date: 2012-11-15 08:49:00


Re: Removing an Item from Magento's Admin Panel Navigation#10
This is definitely the way to handle things in a modern version of Magento. I'm not sure if it's supported in older version, but if you're having trouble see the old, original accepted answer: www.momige.com/a/769931/4668

posted date: 2012-11-15 08:51:00


Re: Removing an Item from Magento's Admin Panel Navigation#11
For a specific menu point you can use:<?xml version="1.0"?><config> <menu> <customer> <children> <online> <disabled>1</disabled> </online> </children> </customer> </menu></config>

posted date: 2013-08-02 01:05:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.