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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Decorating Image - extra cms fields


Reply

3 Posts   484 Views

Avatar
Sewer

27 May 2012 at 6:20am Community Member, 9 Posts

I want to add some extra fields to Image class - mainly for translations.

I guess it shouldn't be done by using updateCMSFields() function. It didn't work for me.

Avatar
Willr

27 May 2012 at 12:18pm Forum Moderator, 5511 Posts

updateCMSFields should work on any DataObject subclass (this includes Image). Make sure you've applied the decorator the image. Try apply your decorator to File and see if updateCMSFields works then.

Avatar
Sewer

31 May 2012 at 5:26am Community Member, 9 Posts

Thanks.
It works on File class, and it should be enough for translating purposes.
Unfortunatelly, it still doesn't work for Image class.