Ad

Typo3 TCA Override: Add Field To Plugin Palette

- 1 answer

I try to add a field to the plugin palette.

$fields = [
    'filtertest' => [
        'exclude' => 1,
        'label' => 'Filter',
        'config' => [
            'type' => 'select',
            'renderType' => 'selectSingle',
            'items' => [
                ['Test 1', '1'],
                ['Test 2', '2'],
                ['Test 3', '3'],
            ]
        ],
    ]
];

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $fields);

// This is not working
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('tt_content', 'plugin',
    'filtertest', 'after:list_type');

// Working, but not the desired palette
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('tt_content', 'gallerySettings',
    'filtertest', 'after:imagecols');

Is it the wrong name for the plugin palette? When trying to add the field to another palette (gallerySettings) it works fine.

Ad

Answer

What palette plugin?
I find no palette with this name in my installation.

have a look in the BE module Configuration at the $GLOBALS['TCA'] (Table configuration array) -> tt_content-> palettes

Do you mean the plugin configuration, which is done with XML?
That's the field 'pi_flexform' which is handled in a special way you can see in the manual

Ad
source: stackoverflow.com
Ad