Overriding TCA values in pageTS

2k Views Asked by At

I want to change the label of tt_address records when displayed in the list view. Instead of "name" there should be used the value of the field "organization" as the default label. I'd like to achieve this by overriding the TCA -if possible- via TypoScript in the pageTS. Unfortunately the following attempt did not have the desired effect:

TCEFORM {
    tt_address {
        ctrl {
            label = company
            label_alt = name, last_name, first_name
        }
    }
}

Instead of TCEFORM, I tried it with TCADefaults, but that did not change anything. What would be the right definition to reach that goal?

Thanks in advance!

2

There are 2 best solutions below

0
Heinz Schilling On BEST ANSWER

To change the displayed columns in list module you have to overrides TCA in your own extension. In file EXT:xyz/Configuration/TCA/Overrides/tt_content.php

$GLOBALS['TCA']['tt_address']['ctrl']['label'] = 'company';
$GLOBALS['TCA']['tt_address']['ctrl']['label_alt'] = 'name, last_name, first_name';
6
Heinz Schilling On

You have to use the column name to overwrite the label. Form is TCEFORM.[tableName].[fieldName].[propertyName]

In your case you want to overwrite field 'name'.

TCEFORM.tt_address.name.label = Company

See for further details: https://docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/TceForm.html