FriendsOfTYPO3 / content-blocks

TYPO3 CMS Content Blocks - Content Types API
https://docs.typo3.org/p/friendsoftypo3/content-blocks/main/en-us/
GNU General Public License v2.0
64 stars 18 forks source link

Add possibility to configure groupName for custom record types #203

Open tehplague opened 5 months ago

tehplague commented 5 months ago

At the moment \TYPO3\CMS\ContentBlocks\Generator\TcaGenerator is unable to set ['ctrl']['groupName'] in TCA generated for custom record types. This makes custom record types loosely flying around in the new content wizard. The groupName could theoretically later be set by means of an additional PSR-14 listener. But this approach would introduce a need for developer effort that EXT:contentblocks tries to avoid.

IMHO it would be best if TcaGenerator was extended by an appropriate YAML option specified in the EditorInterface.yaml which could then be read in Classes/Generator/TcaGenerator.php:882 ff.

nhovratov commented 5 months ago

@tehplague The whole NewRecord view and its grouping is a mess unfortunately. It groups records by extension, rather than a defined groups (like for Content Elements). So if you name your table "tx_myextensionfoo", then "myextension" becomes the groupName automatically. If you don't name your table with "tx", then TYPO3 assumes it is a system table and groups it under "system". This is why I didn't include this weird "groupName" option in the yaml options. Otherwise you would need to define an extension key, which cotradicts the self-contained concept.