Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
Category
New in version 11.4
The TCA field type called category
has been added to TYPO3 Core. Its main
purpose is to simplify the TCA configuration when adding a category
tree to a record. It therefore supersedes the Category
as well
as the Extension
, which has required
creating a "TCA overrides" file.
While using the type category
, TYPO3 takes care of generating the
necessary TCA configuration.
Developers only have to define the TCA column and add category
as the
desired TCA type in the tables's TCA file (inside or outside of the Overrides folder).
$GLOBALS['TCA'][$myTable]['columns']['categories'] = [
'config' => [
'type' => 'category'
]
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
$myTable,
'categories'
);
The following options can be overridden via page TSconfig, TCE form:
size
maxitems
minitems
read
Only tree
Config
Note
It is still possible to configure a category tree with type=select
and render
when you want to override specific fields,
but in most cases the simplified category
TCA type is sufficient.