PHP-Code:
use Contao\CoreBundle\DataContainer\PaletteManipulator;
$GLOBALS['TL_DCA']['tl_content']['config']['onload_callback'][] = function() {
PaletteManipulator::create()
->addField('sc_type_own', 'colset_legend', PaletteManipulator::POSITION_APPEND)
->applyToPalette('colsetStart', 'tl_content')
;
$GLOBALS['TL_DCA']['tl_content']['fields']['sc_type_own'] = [
'inputType' => 'select',
'options_callback'=> ['tl_content_sc','getAllTypes'],
'eval' => ['includeBlankOption' => true, 'mandatory' => true, 'tl_class'=>'w50'],
'sql' => ['type' => 'string', 'length' => 64, 'default' => ''],
];
};
(ungetestet)
Lesezeichen