Storing the changes¶
There are various ways to store changes to
depend - partly - on what you are trying to achieve and - a lot -
on the version of TYPO3 CMS which you are targeting. The TCA can only be
changed from within an extension.
Storing in extensions¶
The advantage of putting your changes inside an extension is that they are nicely packaged in a self-contained entity which can be easily deployed on multiple servers.
The drawback is that the extension loading order must be finely controlled. However, in case you are modifying Core TCA, you usually don’t have to worry about that. Since custom extensions are always loaded after the Core’s TCA, changes from custom extensions will usually take effect without any special measures.
If your extension modifies another extension, you actively need to make sure your extension is loaded after the extension you are modifying. This can be achieved by registering that other extension as a dependency (or suggestion) of yours. See the description of constraints in Core APIs.
Loading order also matters if you have multiple extensions overriding the same field, probably even contradicting each other.
For more information about an extension’s structure, please refer to the extension architecture chapter in Core APIs.
Storing in the overrides folder¶
Since TYPO3 CMS 6.2 (6.2.1 to be precise) changes to
must be stored inside a folder called
For clarity files should be named along the pattern
Thus if you want to customize the TCA of
you’d create the file
The advantage of this method is that all such changes are incorporated into
$GLOBALS['TCA'] before it is cached. This is thus far more efficient.
All files within
Configuration/TCA/Overrides will be loaded, you are not forced
to have a single file for table “tt_content” for instance. When dealing with custom
content elements this file can get 1000+ lines very quickly and maintainability can get
hard quickly as well.
Also names don’t matter in that folder, at least not to TYPO3. They only might influence
loading order. Proper naming is only relevant for the real definition of tables one
folder up in
Be aware that you cannot extend the TCA of extensions if it was configured within
ext_tables.php file, usually containing the “ctrl” section
referencing a “dynamicConfigFile”. Please ask the extension author to switch
Only TCA-related changes should go into
files. Some API calls may be okay as long as they also manipulate only
$GLOBALS['TCA']. For example, it is fine to register a plugin with
Configuration/TCA/Overrides/tt_content.php because that API call only
$GLOBALS['TCA'] for table “tt_content”.
Storing in ext_tables.php files¶
Until TYPO3 CMS 6.1 (still supported for 6.2) changes to
$GLOBALS['TCA'] are packaged
into an extension’s
ext_tables.php file. This is strongly discouraged in more recent
versions of TYPO3 CMS.
Nowadays the only usecase for TCA changes in
ext_tables.php is to override TCA definitions
done in the
ext_tables.php of a legacy extension. TCA overrides cannot be used in this case
until the author of the legacy extension migrates his code.