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

Add possibility to name shortcode different from classname #10

Open wernerkrauss opened 9 years ago

wernerkrauss commented 9 years ago

I e.g. have a Youtube shortcode that should be handled by a class YoutubeShortcode.

I propose to add an (optional) method getShortcodeName() to get it. I can submit a PR if you want me to.

wernerkrauss commented 9 years ago

Or use config system?

wernerkrauss commented 9 years ago

Came around this issue defining a new

class Foo extends Object implements Shortcodable

But some configuration for this would still be need for better encapsulation

sheadawson commented 9 years ago

Happy to merge a PR using the config system. Please update the readme too :)