I have developed a custom content element based on the image type of tt_content. Now I would like to edit the columns alternative, description and title (label and possibly change type and description). Since these are not columns of tt_content but sys_file_metadata, I am a bit puzzled how to achieve this. The following attempt did not lead to the goal:
$GLOBALS['TCA']['tt_content']['types']['my_custom_ce'] = [
'columnsOverrides' => [
'image' => [
'config' => [
'overrideChildTca' => [
'assets' => [
'config' => [
'overrideChildTca' => [
/* some overrides */
]
]
]
]
],
],
],
],
],
Can someone please explain to me how I can change the columns of a referenced object in the context of a custom content element? I am grateful for any tips!
As you asked the question with TYPO3 v12 tagged, you should take a closer look at https://docs.typo3.org/m/typo3/reference-tca/12.4/en-us/ColumnsConfig/Type/File/Index.html If you want to override alternative, title, etc. in your content element, the data is not stored inside sys_file_metadata, but in the reference table sys_file_reference. To use and adjust your needs, you should take TCA type file to configure your backend element.
If you not just want to override but change the values directly in sys_file_metadata (which should not be done, as this will change the fields for all relations where no override in sys_file_reference is done), you could do with https://github.com/fgtclb/typo3-file-required-attributes