Jump to:

5451 Posts in 1673 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » to much tabs :-)

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

Page: 1
Go to End
Author Topic: 512 Views
  • danzzz
    Avatar
    Community Member
    175 Posts

    to much tabs :-) Link to this post

    hi,

    I have to much tabs at a DataObject in the backend, see attached image ...
    How would you solve this? Just change some CSS or replace it with a dropdown (if so how)?

    thx

    Attached Files
  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: to much tabs :-) Link to this post

    function getCMSFields() {
       $fields = parent::getCMSFields();
       $fields->removeByName('TabNameHere');
       return $fields;
    }

  • danzzz
    Avatar
    Community Member
    175 Posts

    Re: to much tabs :-) Link to this post

    hi swaiba,

    I kown how to remove them
    I need all this tabs, I placed them there ...

    What i want to ask is, how others do if they have so much tabs and one row is not enough ...

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: to much tabs :-) Link to this post

    Ahhhh, my bad...

    I am assuming this is a ModelAdmin EditForm... right?
    if they are HasMany or ManyMany ComplexTableFields (scaffolded) then the option is to move them into something like a CheckBoxfieldSet but this means you can no longer get all of the functionality - just selection of the relevant items.

    other than that - you can write a lot of custom code to add the fields to different tabs and handle the saving of the data to the different (related) objects.

    or... maybe someone does have a better idea - as always interested to hear it...

  • danzzz
    Avatar
    Community Member
    175 Posts

    Re: to much tabs :-) Link to this post

    yes ModelAdmin ... the most of the tabs handle only 1 object, I tried to share the fields of the object in logical parts ...

    I try to reduce the tabs and merge some forms together ... but I'm also interessted in an easy solution.

    *searching for the font-size of the tabs, but dont find it in the css files* :O)

    thx

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