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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

How can I add stuff to the image class and show in popup?


Go to End


9 Posts   2921 Views

Avatar
joelg

Community Member, 134 Posts

26 August 2009 at 2:01am

Great thanks, that did the job with the SimpleTreeDropdownField. Brilliant!

Regarding the last thing, I've done this to remove the extended options from folders and it works:

public function updateCMSFields(FieldSet &$fields) {
   		if ($this->ClassName == "image")
   		{
	   		$fields->push(new DropdownField('Kategori','Kategori', singleton('File')->dbObject('Kategori')->enumValues()));
	   		$fields->push(new SimpleTreeDropdownField('SiteLinkID','Vælge en side (hvis kategorien er et link)'));
	   		$fields->push(new FileIFrameField('BilledeThumb'));
   		}
   		return $fields;
	}

Would you consider this good practise or is there a smarter way?

Go to Top