diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index fd32781..d8cfed4 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -4,21 +4,7 @@ \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', [ 'tx_cta_link' => [ 'label' => 'LLL:EXT:cta/Resources/Private/Language/locallang_db.xlf:link.formlabel', - 'config' => [ - 'type' => 'input', - 'renderType' => 'inputLink', - 'size' => '30', - 'max' => '1024', - 'eval' => 'trim', - 'fieldControl' => [ - 'linkPopup' => [ - 'options' => [ - 'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header_link_formlabel', - ], - ], - ], - 'softref' => 'typolink' - ] + 'config' => [], ], 'tx_cta_linklabel' => [ 'label' => 'LLL:EXT:cta/Resources/Private/Language/locallang_db.xlf:linklabel.formlabel', @@ -26,7 +12,7 @@ 'type' => 'input', 'size' => '30', 'max' => '256', - ] + ], ], 'tx_cta_linkconfig' => [ 'label' => 'LLL:EXT:cta/Resources/Private/Language/locallang_db.xlf:linkconfig.formlabel', @@ -40,6 +26,21 @@ ]); if ((\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class))->getMajorVersion() < 12) { + $GLOBALS['TCA']['tt_content']['columns']['tx_cta_link']['config'] = [ + 'type' => 'input', + 'renderType' => 'inputLink', + 'size' => '30', + 'max' => '1024', + 'eval' => 'trim', + 'fieldControl' => [ + 'linkPopup' => [ + 'options' => [ + 'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header_link_formlabel', + ], + ], + ], + 'softref' => 'typolink' + ]; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem( 'tt_content', 'CType', @@ -48,6 +49,13 @@ 'after' ); } else { + $GLOBALS['TCA']['tt_content']['columns']['tx_cta_link']['config'] = [ + 'type' => 'link', + 'size' => '30', + 'appearance' => [ + 'browserTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header_link_formlabel', + ], + ]; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem( 'tt_content', 'CType',