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

to much tabs :-)


Go to End


5 Posts   1006 Views

Avatar
danzzz

Community Member, 175 Posts

18 May 2011 at 11:49pm

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
Avatar
swaiba

Forum Moderator, 1899 Posts

18 May 2011 at 11:55pm

Edited: 19/05/2011 12:01am

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

Avatar
danzzz

Community Member, 175 Posts

19 May 2011 at 12:30am

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

Avatar
swaiba

Forum Moderator, 1899 Posts

19 May 2011 at 12:36am

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

Avatar
danzzz

Community Member, 175 Posts

19 May 2011 at 12:44am

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