Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Remove Menu Item from Admin

Go to End

20 Posts   7081 Views


16 May 2009 at 8:14am Community Member, 9 Posts

I am trying to remove the "help" button from the admin by using:

Object::addStaticVars('LeftAndMain', array(
'removed_menu_items' => array(

in mysite/_config.php file but it does not have any effect of error. I am sure I am missing something.

I am using SS v2.3.1


16 May 2009 at 10:44am Forum Moderator, 5511 Posts

I think the correct method now for 2.3 is using

CMSMenu::remove_menu_item('help'); // or try 'Help'


16 May 2009 at 10:47am Community Member, 9 Posts

I tried both of those versions and got the same result. No error and the help button is still there. I did run the flush between tests as well.


16 May 2009 at 10:53am Community Member, 9 Posts

For reference here is my mysite/_config.php file


global $project;
$project = 'mysite';

global $databaseConfig;
$databaseConfig = array(
   "type" => "MySQLDatabase",
   "server" => "localhost",
   "username" => "root",
   "password" => "******",
   "database" => "******",

// Remove the 'Help' button in the CMS

// Sites running on the following servers will be
// run in development mode. See
// for a description of what dev mode does.

// This line set's the current theme. More themes can be
// downloaded from

// The next three lines customizes the admin graphics
LeftAndMain::setApplicationName("Website CMS");
LeftAndMain::setLogo(".../themes/cms/logo.gif", "position: relative; left: 5px; margin-top: -3px; padding-left: 50px;");



16 May 2009 at 11:06am Forum Moderator, 5511 Posts

Ok this is a bug - I just noticed it on my localhost as well. It looks like the help link is added right at the end of the operations. This should be a ticket in


16 May 2009 at 11:10am Community Member, 9 Posts

Sorry for nubbie-ness. IS that something I need to do?


22 May 2009 at 4:49am Community Member, 75 Posts

I was having this trouble aswell with the latest stable build found the temp fix for now in /cms/code/LeftAndMain.php just comment out lines 111-115 which stops the help link being added to the menu

   _t('LeftAndMain.HELP', 'Help', PR_HIGH, 'Menu title'),

BLU42 Media

27 June 2009 at 6:41am (Last edited: 27 June 2009 7:06am), Community Member, 71 Posts

A nice, clean way to remove the Help Menu is to decorate LeftAndMain so you don't have to mod your core files:

In your _config.php file, add:

Object::add_extension('LeftAndMain', 'MyLeftAndMainDecorator');

In your /code folder, create MyLeftAndMainDecorator.php and enter the following:


class MyLeftAndMainDecorator extends LeftAndMainDecorator {

   function init() {

Go to Top