TYPO3ContentElements/Configuration/TCA/Overrides/tt_content.php
Daniel Siepmann da3aed135c
Add content element "skills"
Allow editors to add new content element "skills".
The element contains an input for a comma separated list of skill IDs.
A preview in backend is shown.
Frontend rendering is provided.
2020-09-22 10:37:24 +02:00

27 lines
997 B
PHP

<?php
(function (string $extensionKey, string $tableName) {
$languagePath = 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang_tca.xlf:' . $tableName . '.';
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$tableName], [
'columns' => [
'CType' => [
'config' => [
'itemGroups' => [
'skilldisplay' => $languagePath . 'CType.itemGroups.skilldisplay',
],
],
],
'skilldisplay_skills' => [
'exclude' => 1,
'label' => $languagePath . 'skilldisplay_skills',
'description' => $languagePath . 'skilldisplay_skills.description',
'config' => [
'type' => 'input',
'eval' => 'required',
'size' => 10,
],
],
],
]);
})('skilldisplay', 'tt_content');