diff --git a/Configuration/Sets/b13/config.yaml b/Configuration/Sets/b13/config.yaml new file mode 100644 index 0000000..bf14274 --- /dev/null +++ b/Configuration/Sets/b13/config.yaml @@ -0,0 +1,4 @@ +name: b13/cta +label: cta configuration set +dependencies: + - typo3/fluid-styled-content diff --git a/Configuration/Sets/b13/setup.typoscript b/Configuration/Sets/b13/setup.typoscript new file mode 100644 index 0000000..859e3f9 --- /dev/null +++ b/Configuration/Sets/b13/setup.typoscript @@ -0,0 +1,3 @@ +tt_content.cta =< lib.contentElement +tt_content.cta.templateName = Cta +tt_content.cta.templateRootPaths.10 = EXT:cta/Resources/Private/Templates diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index d8cfed4..82c9160 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -1,11 +1,43 @@ getMajorVersion() < 12) { + \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', + ], + ], + ]); +} else { + \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' => 'link', + 'size' => 30, + 'appearance' => [ + 'browserTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header_link_formlabel', + ], + ], + ], + ]); +} + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', [ - 'tx_cta_link' => [ - 'label' => 'LLL:EXT:cta/Resources/Private/Language/locallang_db.xlf:link.formlabel', - 'config' => [], - ], 'tx_cta_linklabel' => [ 'label' => 'LLL:EXT:cta/Resources/Private/Language/locallang_db.xlf:linklabel.formlabel', 'config' => [ @@ -26,21 +58,6 @@ ]); 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', @@ -49,13 +66,6 @@ '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', diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 859e3f9..8f66ddf 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -1,3 +1 @@ -tt_content.cta =< lib.contentElement -tt_content.cta.templateName = Cta -tt_content.cta.templateRootPaths.10 = EXT:cta/Resources/Private/Templates +@import 'EXT:cta/Configuration/Sets/b13/setup.typoscript' diff --git a/composer.json b/composer.json index be78296..2d0f17a 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ } }, "require": { - "typo3/cms-backend": "^10.4 || ^11.0 || ^12.0", - "typo3/cms-fluid-styled-content": "^10.4 || ^11.0 || ^12.0" + "typo3/cms-backend": "^10.4 || ^11.0 || ^12.4 || ^13.0", + "typo3/cms-fluid-styled-content": "^10.4 || ^11.0 || ^12.4 || ^13.0" } } diff --git a/ext_emconf.php b/ext_emconf.php index 1d1f0ce..d14cf05 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -4,7 +4,7 @@ 'title' => 'Content type "CTA"', 'description' => 'Adds a CTA content type to tt_content', 'category' => 'backend', - 'version' => '2.0.3', + 'version' => '2.1.0', 'state' => 'stable', 'author' => 'David Steeb, b13 GmbH', 'author_email' => 'typo3@b13.com', @@ -12,7 +12,7 @@ 'constraints' => [ 'depends' => [ 'fluid_styled_content' => '*', - 'typo3' => '10.4.0-12.99.99', + 'typo3' => '10.4.0-13.99.99', ] ] );