Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Remove Tabs

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: 4003 Views
  • wewo
    Avatar
    Community Member
    7 Posts

    Remove Tabs Link to this post

    Hi there,

    For my current project i need to remove some tabs (eg Meta-Data and Reports) from the default cms page view. Studying the documentation didn't really help me.

    Any suggestions are welcome ..

    regards,
    wewo

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Remove Tabs Link to this post

    function getCMSFields() {
    $fields = parent::getCMSFields();
    $fields->removeFieldFromTab("Root.Content", "Meta-data");
    $fields->removeFieldFromTab("Root.Content", "Reports");
    return $fields;
    }

  • wewo
    Avatar
    Community Member
    7 Posts

    Re: Remove Tabs Link to this post

    Hi Sam,

    Maybe I mixed up some code, but i tried $fields->removeFieldFromTab() without any effect.

    Anyway, now it works

    > $fields->removeFieldFromTab("Root.Content", "Reports");
    should be
    $fields->removeFieldFromTab("Root", "Reports");

    regards,
    wewo

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