Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Hiding tabs in Site Content?

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1394 Views
  • ciaky
    Avatar
    Community Member
    2 Posts

    Hiding tabs in Site Content? Link to this post

    Hi everybody,

    how can I hide or apply restricted permissions to the tabs on "Site Content" section ?
    For example, I would want to disable Meta-data or Behaviour tabs for a group of users.

    Thanks

  • ciaky
    Avatar
    Community Member
    2 Posts

    Re: Hiding tabs in Site Content? Link to this post

    It works but I don't know if it is the best solution:

    function getCMSFields() {
    $fields = parent::getCMSFields();
       if(Permission::check('USER')) {
        $fields->removeByName("Meta-data");
        $fields->removeByName("Behaviour");
    }
    return $fields;
    }

    1394 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.