SSbits - Home page
Site by Carbon Crayon
Submit a Post >

Snippets - Little bits of code to make you happy

Removing an Item From the Main CMS Menu

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.

 

Aram Balakjian avatar

Aram Balakjian

Aram is a web developer running London based agency Aab Web. He has a strong passion for developing attractive, usable sites around the SilverStripe CMS.

  • Don St. Troy
    06/02/2011 1:03pm (4 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 (4 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 (3 years ago)

    To remove the Comments menu item:
    CMSMenu::remove_menu_item('CommentAdmin');

  • HoaLe
    22/03/2012 2:22am (2 years 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.

Advertisement

Site of the Month

Find SSbits on

Top Contributers

Rank Avatar Name
1 article image Aram Balakjian
2 article image Daniel Hensby
3 article image Marcus Dalgren
4 article image Hamish Campbell
5 article image Ty Barho
6 article image Martijn van Nieuwenhoven
7 article image Darren-Lee
8 article image Roman Schmid
9 article image Matt Clegg
10 article image dalesaurus

View full leaderboard


Advertisement