Open nhovratov opened 10 months ago
Interesting use case came up in Slack. The user wanted to reuse a RecordType with 2 different variations. The type should be automatically set in context to the Content Block it is used in. This is possible, however it requires a lot of boilerplate code.
Option 1: Document this specific use case as a guide article.
Option 2: Allow to use this logic with a shortcut and only document the easy way. E.g.: enforceType: typeA
For reference, I used the foreign_match_fields
method from TCA: https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Inline/Properties/ForeignMatchFields.html
todo: evaluate if we could provide type restrictions like in Mask: https://github.com/Gernott/mask/blob/main/Classes/ItemsProcFuncs/CTypeList.php
This is of course really hacky. Maybe this could be a Core feature instead?