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   522 Views

Avatar
Sewer

Community Member, 9 Posts

27 May 2012 at 6:20am

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

Forum Moderator, 5513 Posts

27 May 2012 at 12:18pm

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

Community Member, 9 Posts

31 May 2012 at 5:26am

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