Jump to:

5513 Posts in 1732 Topics by 1218 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Remove the tabs in administrator

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

Page: 1
Go to End
Author Topic: 2731 Views
  • holy noli
    Avatar
    Community Member
    6 Posts

    Remove the tabs in administrator Link to this post

    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
  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Remove the tabs in administrator Link to this post

    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

  • holy noli
    Avatar
    Community Member
    6 Posts

    Re: Remove the tabs in administrator Link to this post

    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?

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Remove the tabs in administrator Link to this post

    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

  • mattclegg
    Avatar
    Community Member
    56 Posts

    Re: Remove the tabs in administrator Link to this post

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

    2731 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.