I am trying to override the label of the crop field of a sys_file_reference in my custom CType. This is what I have so far (added to myext/Configuration/TCA/Overrides/sys_file_reference.php):
(function () {
if (is_array($GLOBALS['TCA']['tt_content']['types']['mytype'])) {
$GLOBALS['TCA']['tt_content']['types']['mytype']['columnsOverrides'] = [
'myfield' => [
'config' => [
'overrideChildTca' => [
'columns' => [
'crop' => [
'label' => 'XXX',
],
],
],
],
],
];
} })();
I am pretty certain this should be working since I verified it does work on textmedia but it is not working for my custom CType. Am I missing something? Could it be the fact that the CType is generated through flux and therefore the fields are in a flexform? Maybe this requires a different approach?
Thank you
Thanks to @Julian Hofmann asking whether the CType might be generated after the TCA override I thought about moving the overrideChildTca into the flux config itself:
<flux:field.inline.fal name="myField"
config="{
overrideChildTca: {
columns: {
description: {
config: {
type: 'passthrough'
} } } } }" />
'passthrough' hides the field.