sheadawson / silverstripe-shortcodable

Provides a GUI for CMS users to insert Shortcodes into the HTMLEditorField + an API for developers to define Shortcodable DataObjects and Views.
MIT License
48 stars 36 forks source link

Viewable data doesn't have method singular_name #21

Closed sheadawson closed 8 years ago

sheadawson commented 8 years ago

Referenced in ShortcodableController line 30

sekjal commented 8 years ago

Looks like this line is now 33, just for updated reference.

Got something similar when implementing Shortcodable on an extension to Member (it was on MemberExtension, not ViewableData). My solution was to add a singular_name() method on my extension that returned the string I wanted.

I would think anything inheriting from DataObject would be all set with this; aside from Extensions, are there any other classes upon which Shortcodable might be applied that aren't DataObjects?

sheadawson commented 8 years ago

Fixed and released as 2.0, see readme for details on upgrades. Cheers!

sheadawson commented 8 years ago

https://github.com/sheadawson/silverstripe-shortcodable/commit/c0b7dd77a037d885b382e00ed19cfb874545e65f