Snippets - Little bits of code to make you happy
Removing an Item From the Main CMS Menu
Tweet3 July 2009 | |
If you want to remove an item from the CMSTopMenu without making it inaccessible you can add this line to your _config.php file:
CMSMenu::remove_menu_item('SecurityAdmin');
This example will remove the Security link.
Note. You would still be able to access the Securtiy section by going to admin/security, it just won't show in the menu.
4 Comments
RSS feed for comments on this page RSS feed for all comments
Don St. Troy
06/02/2011 1:03pm (2 years ago)
To rename a menu on the top of the admin, I first removed it, and then added a menu item.
Line 1- CMSMenu::remove_menu_item('AssetAdmin');
Line 2 - CMSMenu::add_menu_item('AssetAdmin','Assets','admin/assets/');
Don St. Troy
06/02/2011 1:07pm (2 years ago)
It would be useful to rename security, when delivering the site to a content editor. Security would then become 'Users'.
Toby Champion
15/03/2011 1:11am (2 years ago)
To remove the Comments menu item:
CMSMenu::remove_menu_item('CommentAdmin');
HoaLe
22/03/2012 2:22am (1 year ago)
Hello, I'm a Silverstripe newbie. Could you please tell me whether it is possible to remove the controller as well (stop Admin from accessing the Securtiy section by going to admin/security)?
Post a comment ...
You cannot post comments until you have logged in. Login Here.