New content element wizard
This section covers settings which influence the New content element wizard.
Example: Setting default values for News plugins (TYPO3 < 13)
The following examples sets some default values of the plugin "News article list (incl. detail view)" and "News Article Detail View".
mod.wizards.newContentElement.wizardItems.ext-news {
elements {
news_list {
tt_content_defValues {
header_layout = 2
header = Latest news from #replace this#
}
}
news_detail {
tt_content_defValues {
header_layout = 3
layout = 1
}
}
}
}
Note
The plugins are added to the New Content Element wizard by loading the TSConfig file ContentElementWizard.tsconfig
In TYPO3 versions < 13 this is done automatically by the news extension.
Example: Setting default values for News plugins (TYPO3 >= 13)
Changed in version 13.0
Custom content element types are auto-registered for the New Content Element wizard. The listing can be configured using TCA.
See Feature: #102834 - Auto-registration of New Content Element Wizard via TCA
The TSConfig file that previously registered the plugins in the New Content Element wizard is not evaluated anymore.
The following examples sets some default values of the plugin "News article list (incl. detail view)" and "News Article Detail View".
Note
Notice the changed keys for the wizard group and elements:
news
represents the extension key
news_
and news_
represent the plugin CType.
mod.wizards.newContentElement.wizardItems.news {
elements {
news_pi1 {
tt_content_defValues {
header_layout = 2
header = Latest news from X (replace this)
}
}
news_newsdetail {
tt_content_defValues {
header_layout = 3
layout = 1
}
}
}
}
Example: Setting default values for News plugins with TCA Overrides
New in version 13.0
Default values for the plugins can also be defined with TCA Overrides by using creationOptions of the tt_content type
section.
$GLOBALS['TCA']['tt_content']['types']['news_pi1]['creationOptions']['defaultValues'] = [
'header_layout' => 2,
'header' => 'Latest news from X (replace this)',
];
$GLOBALS['TCA']['tt_content']['types']['news_newsdetail]['creationOptions']['defaultValues'] = [
'header_layout' => 3,
'layout' => 1,
];