Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SilverStripe: How do I insert a tab before another tab?

I am trying to insert a new admin tab before Root.Content.Main without any luck. I've tried:

$fields->insertBefore(new Tab('Root.Content.Overview', 'Overview'), 'Root.Content.Main');

and

$fields->addFieldToTab('Root.Content', new Tab('OverviewTab', 'Root.Content.Overview'), 'Root.Content.Main');

without any luck.

Anyone have any ideas? I've hunted through the API but there isn't much explanation as to how the tab naming system works.

like image 862
mwalsher Avatar asked Feb 17 '11 18:02

mwalsher


1 Answers

Figured it out...

$fields->insertBefore(new Tab('Overview', 'Project Overview'), 'Main');
like image 155
mwalsher Avatar answered Nov 14 '22 09:11

mwalsher