Search code examples
typo3typo3-9.xtypo3-tca

Overriding TCA values in pageTS


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!


Solution

  • 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';