Feature #34031
closedAllow setting allowedItems through TypoScript
0%
Description
allowedItems can currently only be modified through a hook and defaults to the hardcoded "magic,plain,image". But it would easily be possible to override this through TypoScript if that setting is set and still keep the full functionality with hooks, removeItems etc.
Thanks go to Bernd Wilke for the idea.
Updated by Gerrit Code Review about 12 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9069
Updated by Stefan Neufeind about 12 years ago
Updated by Gerrit Code Review about 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9069
Updated by Stanislas Rolland about 12 years ago
Any item may be removed in the RTE Page TSConfig with
buttons.image.options.removeItems = some-list-of-item-keys
Do you mean that you want to add a new property to allow to configure the order of the tabs? like
buttons.image.options.orderItems ?
If not, how do you suggest to configure the order of items?
Please do not change the current default order on all users of all installations just because you want to use a different order.
Also, keep in mind that the configuration of items (allowed and/or ordered) must apply as well to items added by hooks.
Updated by Stefan Neufeind about 12 years ago
I don't indend to remove them (removeItems) but reorder them. I wasn't aware that orderItems is used in rtehtmlarea already - but that's only for buttons.formattext.orderItems and buttons.formatblock.orderItems. And in the docs of those (http://typo3.org/documentation/document-library/extension-manuals/rtehtmlarea_manual/1.7.4/view/4/4/) it is written that if no ordering is set they appear in alphabetic order - well, that's not the case with tabs (which have a "random" natural order).
The idea was to allow moving items by reordering them in allowedItems. The current positioning is the one already present/default in allowedItems so that doesn't change anything in output for the default-case.
Currently the patch adds for allowedItems to be modified by tsconfig and for sure hooks can still change the contents of this array in any way they want to.
So if I understand you right: Do you suggest that not allowedItems is used for what the patch proposes but an "orderItems"-option is added? And if no "orderItems" is set what order is used then?
I'll be happy to rework the patch as you suggest.
Updated by Stanislas Rolland about 12 years ago
I think 'allowedItems' is redundant/competing with 'removeItems'.
Please use 'orderItems'.
Apply the order after the allowed items have been determined:
allowed items = base items + hook additions/removals - browser restrictions - 'removeItems'
so that all items may be ordered in Page TSConfig, including those added by hooks.
If 'orderItems' is specified, any item in the list must be valid: remove from the list any item not allowed.
Finally, if 'orderItems' is specified, any item not in the list is not allowed.
The default order is the order we have today, possibly modified by hooks.
Updated by Gerrit Code Review about 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9069
Updated by Stefan Neufeind about 12 years ago
please close. this was merged.
Functionally reachable via "buttons.image.options.orderItems" in PageTS, not allowedItems as I originally suggested
Updated by Stanislas Rolland about 12 years ago
- Status changed from Under Review to Closed