Feature #77842
closedexplicitly allow CTypes for columns in backend_layout
0%
Description
Not sure if I'm in the right category and therefore, if this is maybe a duplicate/on some list already?
I've seen there is a similar implementation in gridelements, but I think this would make a very desirable & useful little core feature: define allowed CTypes directly in the backend_layout config:
columns { 1{ name = Main colPos = 0 colspan = 1 allowedCTypes = text,textpic } }
What do you think?
Updated by Sascha Egerer over 7 years ago
It's not that easy. That must be implemented on a column basis as you can change the column at multiple places. Moving content elements from one to another page could also work around that.
Updated by Urs Braem over 7 years ago
For others searching for a solution: a quick way to do it with TSConfig is to disable all tabs for starters, then you can add items by colPos:
// disable all mod.wizards.newContentElement.wizardItems.common.show = mod.wizards.newContentElement.wizardItems.special.show = mod.wizards.newContentElement.wizardItems.forms.show = mod.wizards.newContentElement.wizardItems.plugins.show = mod.wizards.newContentElement.wizardItems.mask.show = // set individual by colPos // and active backend_layout: [globalVar = GP:colPos==0]&&[page|backend_layout = 0] // would be nice, but the value doesn't "slide" up the tree [globalVar = GP:colPos==0] mod.wizards.newContentElement.wizardItems.common.show := addToList(header) [end]
(most googlable solutions use removeFromList(), which will become polluted as soon as you add new content types, that's why I mention it here.
As Sascha says correctly, it's more than just replicating the TSConfig into a BE Layout setting, as you can still work around the wizard's limitations by either changing the CType later or creating elements of a "forbidden" CType in another column and moving them afterwards. While such effects may be helpful in some cases, the option in BE Layout should probably disable all of that at once. As the above solution seems to work quite well, that's probably the reason why the feature isn't really urgent. In a world with unlimited resources, it would be a plausible thing to implement though.
Updated by Jo Hasenau over 7 years ago
- Status changed from New to Closed
Closed as duplicate of #7459
I know the issue is quite old, but I have been asked to reactivate it, so you can expect to see some progress there soon.
Updated by taywa gmbh about 7 years ago
this would make it easier for editors, especially on heavily customised websites. it would be even cooler if one could specify the media type(s) for textmedia content-elements