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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

Remove the tabs in administrator


Go to End


5 Posts   4754 Views

Avatar
holy noli

Community Member, 6 Posts

22 March 2010 at 10:28pm

I would like to remove and dumb down the cms for my needs and employees. I have little php knowlege but silverstripe is proving very easy for a novice to manage.

I am lost when it comes to customizing the admin section. I want to remove the top set of tabs. Please see attached file. I did read you can do it be setting security permissions, but I would like to remove them from the coding

I would appreciate it if someone could give me advice or tell me where the file is so I can make the changes

Thank you in advance.

Attached Files
Avatar
Carbon Crayon

Community Member, 598 Posts

24 March 2010 at 2:00am

Hi Holi

You can do this using the following in your getCMSFields() function in Page.php:

$fields->removeByName('Todo');

That will remove the todo list.

Normally when I do this sort of thing, I only do it for non admin users, as things like Access and Behavior are quite important to be able to access for the Administrators.

So to do this you would add the following to the getCMSFields() function:

if(!Permission::check('ADMIN'){
$fields->removeByName('Todo');
$fields->removeByName('Access');
// etc......
}

Hope that helps

Aram

www.ssbits.com

Avatar
holy noli

Community Member, 6 Posts

29 March 2010 at 6:26am

Hi Aram

You are a gentleman. Thank you for your help. I am not reading your tutorials they are great also. I am not a php coder so I am not very versed on the process. I think where I am stuck is as follows

I put in the piece of code. Save the file. Then do I have to build the db with the db command>?] db/build? and do I need to remove the corresponding tags in page.ss. Or am i totally wrong?

Avatar
Carbon Crayon

Community Member, 598 Posts

31 March 2010 at 1:47pm

Hi Holi,

No you just put the code into the getCMSFields() function in Page.php and you should be good to go. You only need to rebuild the database (dev/build) when you change the structure of the database (e.g. change the $db array) and you only need to edit your templates when you want to change something on the front end.

Aram

www.ssbits.com - SilverStripe tutorials tips and other bits

Avatar
mattclegg

Community Member, 56 Posts

15 December 2011 at 5:02am

Edited: 15/12/2011 5:05am

Some ssbits users say the most funniest things;
"I am not reading your tutorials they are great also"