silverstripe-shortcodable icon indicating copy to clipboard operation
silverstripe-shortcodable copied to clipboard

Add possibility to name shortcode different from classname

Open wernerkrauss opened this issue 10 years ago • 3 comments

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 avatar Mar 11 '15 19:03 wernerkrauss

Or use config system?

wernerkrauss avatar Mar 11 '15 19:03 wernerkrauss

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

wernerkrauss avatar Jul 10 '15 12:07 wernerkrauss

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

sheadawson avatar Jul 16 '15 22:07 sheadawson