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

Possibility to disable automatic ID dropdown #13

Closed wernerkrauss closed 8 years ago

wernerkrauss commented 9 years ago

I have a shortcode named like the DataObject that just uses the tile instead of the ID (yes, i know, that's bad, but for historic reasons).

There is no built in functionality to disable the automatic ID dropdown now.

sheadawson commented 9 years ago

Can you use the extension hook ShortcodableController->ShortcodeForm-> updateShortcodeForm ?

wernerkrauss commented 9 years ago

I did this already, but it feels a bit wrong, cause updateShortcodeForm is global, so i first have to check if it's the shortcode i want to modify.

Best would be that the shortcode itself could update the shortcode form, or disable / overwrite the id field. (BTW: i tried to use your quickAddNew button, had to overwrite the id field again, but it didn't work due to controller issues)

sheadawson commented 8 years ago

I think what you're trying to do here sounds a like a bit of an edge case. If you'd like to make a pull request for this though you are welcome to. Closing for now :)