typo3fal

How do I suppress FAL fields in CEs for the editor?


I develop a content element, which uses an image. Because it outputs the image as an inline style element: <div style="/fileadmin/_processed_/2/a/csm_article-image-1.4_a50d0b1375.jpg">[..]</div>, I want to suppress the FAL-fields alt, title, and description for the CE for the editor.

Example: screenshot

At now I use the following TypoScript :

TCEFORM {
    sys_file_reference {
        alternative.disabled = 1
        description.disabled = 1
        title.disabled = 1
        link.disabled = 1
    }

}

But this solution forces all CE to hide the file.metadata.

What does the TCA configuration look like?

Edit: The solution from @rudy-gnodde works flawlessly:

$GLOBALS['TCA']['tt_content']['types']['ce_image']['columnsOverrides']['image']['config']['overrideChildTca']['types'][0]['showitem'] = 'crop,--palette--;;filePalette';
$GLOBALS['TCA']['tt_content']['types']['ce_image']['columnsOverrides']['image']['config']['overrideChildTca']['types'][1]['showitem'] = 'crop,--palette--;;filePalette';
$GLOBALS['TCA']['tt_content']['types']['ce_image']['columnsOverrides']['image']['config']['overrideChildTca']['types'][2]['showitem'] = 'crop,--palette--;;filePalette';
$GLOBALS['TCA']['tt_content']['types']['ce_image']['columnsOverrides']['image']['config']['overrideChildTca']['types'][3]['showitem'] = 'crop,--palette--;;filePalette';
$GLOBALS['TCA']['tt_content']['types']['ce_image']['columnsOverrides']['image']['config']['overrideChildTca']['types'][4]['showitem'] = 'crop,--palette--;;filePalette';
$GLOBALS['TCA']['tt_content']['types']['ce_image']['columnsOverrides']['image']['config']['overrideChildTca']['types'][5]['showitem'] = 'crop,--palette--;;filePalette';

Solution

  • If you're using the existing image field, you can override which fields it should show using:

    $GLOBALS['TCA']['tt_content']['columns']['image']['config']['overrideChildTca']['types'][0]['showitem'] = 'crop,--palette--;;filePalette';
    $GLOBALS['TCA']['tt_content']['columns']['image']['config']['overrideChildTca']['types'][1]['showitem'] = 'crop,--palette--;;filePalette';
    $GLOBALS['TCA']['tt_content']['columns']['image']['config']['overrideChildTca']['types'][2]['showitem'] = 'crop,--palette--;;filePalette';
    $GLOBALS['TCA']['tt_content']['columns']['image']['config']['overrideChildTca']['types'][3]['showitem'] = 'crop,--palette--;;filePalette';
    $GLOBALS['TCA']['tt_content']['columns']['image']['config']['overrideChildTca']['types'][4]['showitem'] = 'crop,--palette--;;filePalette';
    $GLOBALS['TCA']['tt_content']['columns']['image']['config']['overrideChildTca']['types'][5]['showitem'] = 'crop,--palette--;;filePalette';
    

    If it's a custom field you should add the part from overrideChildTca to the config of that field's TCA configuration.

    This will only show the Image manipulation field.