IchHabRecht / mask_export

Export your mask elements as extension
GNU General Public License v2.0
45 stars 27 forks source link

How to limit allowed CTypes in content field? #56

Closed manuelbachl closed 7 years ago

manuelbachl commented 7 years ago

Hi there,

I have some content elements using the "content" field. Now, when I want to add some content, the list of possible nested content elements is quite too long and even shows those elements (like default TYPO3 elements) which are disabled by backend layout. I also don't want the editor to be able to nest the containers themselves. When choosing the allowed CTypes inside mask, the export seems to have a little bug: The container still lists all content elements. Also it sets the default selected content element to the first selected one (this behaviour is quite fine). But it seems to limit the allowed content types to this very first allowed CType. every other CType wont get rendered in FE.

Am I missing something?

If mor information should be provided, please let me know.

Thanks in advance for sour help

IchHabRecht commented 7 years ago

Limiting the CTypes according to any backend layout is not supported by the TYPO3 core itself and though also not by the export. Mask itself is adjusting the CType elements by using a hook as far as I know.

But it seems to limit the allowed content types to this very first allowed CType. every other CType wont get rendered in FE.

I need to have a look. You can change it in the mean time by changing the TypoScript for FE dataProcessing and adjusting the where clause.

IchHabRecht commented 7 years ago

Hi Manuel,

I improved the where clause in the DatabaseQueryProcessor which should now be able to render all allowed CType elements. Would you mind to test the pull request (https://github.com/IchHabRecht/TYPO3-mask_export/tree/ctype-improvements). Still a limitation in the backend is not possible with current TYPO3 native functions.

manuelbachl commented 7 years ago

Sounds nice, let me check this next days. I'll provide feedback as soon as possible

manuelbachl commented 7 years ago

Tested, seems to be working now.