diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index 35e38775b..865ad4e81 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -10,7 +10,7 @@ $pluginConfig = ['pi1', 'news_list_sticky', 'news_detail', 'news_selected_list', 'news_date_menu', 'category_list', 'news_search_form', 'news_search_result', 'tag_list']; foreach ($pluginConfig as $pluginName) { $pluginNameForLabel = $pluginName === 'pi1' ? 'news_list' : $pluginName; - ExtensionUtility::registerPlugin( + $pluginIdentifier = ExtensionUtility::registerPlugin( 'news', GeneralUtility::underscoredToUpperCamelCase($pluginName), 'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:plugin.' . $pluginNameForLabel . '.title', @@ -25,31 +25,18 @@ ExtensionManagementUtility::addPiFlexFormValue( '*', 'FILE:EXT:news/Configuration/FlexForms/flexform_' . $flexformFileName . '.xml', - $contentTypeName + $pluginIdentifier + ); + // Add the FlexForm to the show item list + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes( + 'tt_content', + '--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.plugin, pi_flexform', + $pluginIdentifier, + 'after:palette:headers' ); - $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes'][$contentTypeName] = 'ext-news-plugin-' . str_replace('_', '-', $pluginNameForLabel); - $GLOBALS['TCA']['tt_content']['types'][$contentTypeName]['previewRenderer'] = PluginPreviewRenderer::class; - $GLOBALS['TCA']['tt_content']['types'][$contentTypeName]['showitem'] = ' - --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, - --palette--;;general, - --palette--;;headers, - --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.plugin, - pi_flexform, - --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance, - --palette--;;frames, - --palette--;;appearanceLinks, - --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language, - --palette--;;language, - --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access, - --palette--;;hidden, - --palette--;;access, - --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories, - categories, - --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:notes, - rowDescription, - --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended, - '; + $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes'][$pluginIdentifier] = 'ext-news-plugin-' . str_replace('_', '-', $pluginNameForLabel); + $GLOBALS['TCA']['tt_content']['types'][$pluginIdentifier]['previewRenderer'] = PluginPreviewRenderer::class; } $GLOBALS['TCA']['tt_content']['columns']['CType']['config']['itemGroups']['news'] = 'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:pi1_title';