1
votes

I am asking myself what is a proper way to control the available CEs depending on the backend_layout and colPos for the editors. Today I realized, that the config option "allowed" is only available in the backend_layout, when gridelements is installed. Without gridelements I just can control the allowed CEs with a condition in my page TSConfig:

[globalVar = GP:colPos==0] && [page|backend_layout = pagets__myLayout]
    TCEFORM.tt_content.CType.keepItems = image
[end]

Or configuring the new content element wizard like:

[globalVar = GP:colPos==0] && [page|backend_layout =pagets__myLayout]
    mod.wizards.newContentElement.wizardItems.common.show := addToList(image)
[end]

But in the end you can change the CType in the tt_content form to all types made available globally.

Are there any other ways to control the CTypes? Thank you.

1

1 Answers

0
votes

No. The current TCA ['types'] system does not allow to restrict content element types depending on colPos in a clean way.

You may be able to create a data provider in FormEngine for specific implementations in sites, but that depends on PHP skills - read https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/FormEngine/Introduction/Index.html for further info on that.