Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Configuration/Sets/b13/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: b13/cta
label: cta configuration set
dependencies:
- typo3/fluid-styled-content
3 changes: 3 additions & 0 deletions Configuration/Sets/b13/setup.typoscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tt_content.cta =< lib.contentElement
tt_content.cta.templateName = Cta
tt_content.cta.templateRootPaths.10 = EXT:cta/Resources/Private/Templates
62 changes: 36 additions & 26 deletions Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,43 @@
<?php
defined('TYPO3') or die();

if ((\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class))->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' => [
Expand All @@ -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',
Expand All @@ -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',
Expand Down
4 changes: 1 addition & 3 deletions Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
@@ -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'
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
'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',
'author_company' => 'b13 GmbH',
'constraints' => [
'depends' => [
'fluid_styled_content' => '*',
'typo3' => '10.4.0-12.99.99',
'typo3' => '10.4.0-13.99.99',
]
]
);