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

Adding tab to files popup


Go to End


3 Posts   1377 Views

Avatar
Jaggi

Community Member, 1 Post

6 July 2011 at 8:54pm

I'm trying to add a tab to the files popup in the CMS under "Files and Images", I also need this to have access to the data in the other tab so I know which file I'm viewing. I've tried a few things but not had any luck.

Does anyone have a solution to this problem?

Thanks.

Avatar
jaybee

Community Member, 49 Posts

8 October 2011 at 9:37pm

I would also like to add a new tab and fields to the Files Popup in the CMS under Files and Images. How can it be done?

Avatar
jaybee

Community Member, 49 Posts

9 October 2011 at 12:30am

Found the solution after trying a lot of things:

public function updateCMSFields(FieldSet &$fields) {
	$newTab = new Tab('NewTab', 'New Tab');
	$fields->insertAfter($newTab, 'Main');
	$newTab->fields()->push(new TextField('NewField'));
}