I've tried to make my own distribution but still stuck at TCA script... I tried to make an own Content Element, that also worked. But if I want to display an Textarea as RichTextEditor or an Input Field as an ValuePicker, it won't work.
So this is my code in tt_content.php
$GLOBALS['TCA']['tt_content']['columns']['testText'] = array(
'exclude' => 1,
'label' => 'LLL:EXT:PRIVATE/Resources/Private/Language/locallang_tabs.xlf:tesText',
'config' => array(
'type' => 'text',
'cols' => 40,
'rows' => 6,
'wizards' => array(
'_PADDING' => 2,
'RTE' => array(
'notNewRecords' => 1,
'RTEonly' => 1,
'type' => 'script',
'title' => 'Full Test',
'module' => array(
'name' => 'wizard_rte'
),
'icon' => 'wizard_rte2.gif'
)
),
'enableRichtext' => true,
'defaultExtras' => 'richtext[]'
)
);
At the Backend I can see only the normal Textarea and no RTE or even a ValuePicker. Even though I change the palette type to Bodytext as following, there is an Textarea.
$GLOBALS['TCA']['tt_content']['types']['PRIVATE_termin'] = array(
'showitem' => '
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:palette.general;general,
--palette--;LLL:EXT:PRIVATE/Resources/Private/Language/locallang_tabs.xlf:general, header, bodytext, termin, termin2, platz, farbe
');
I defined the ValuePicker as following:
$GLOBALS['TCA']['tt_content']['columns']['farbe'] = array(
'label' => 'LLL:EXT:PRIVATE/Resources/Private/Language/locallang_tabs.xlf:farbe',
'config' => array(
'type' => 'input',
'size' => 20,
'valuePicker' => array(
'items' => array(
['#496D0C', '<font color="#496D0C">Neutral</font>'],
['#91AD33', '<font color="#91AD33">Grün</font>'],
['#F59B00', '<font color="#F59B00">Gelb</font>'],
['#CD1013', '<font color="#CD1013">Rot</font>']
),
)
)
);
I also tried to remove the HTML tags, but it still won't work.
I'm looking forward to hearing from you :)
MfG Ascawath
As far as I see, valuePicker
is not supported in TYPO3 7.6 but in TYPO3 v8 only.
It was introduced in january 2017; https://github.com/TYPO3/TYPO3.CMS/commit/84be5e616b5373ac7ba57edf2d3cd61251dc6f97
In TYPO3 7.6 you need a select wizard - https://docs.typo3.org/typo3cms/TCAReference/7.6/AdditionalFeatures/WizardsConfiguration/Index.html#select-wizards