Attention
TYPO3 v12 has reached end-of-life as of April 30th 2026 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v12 here: TYPO3 ELTS.
Access TypoScript in an extension
Note
This part is written for extension developers.
This page explains how to access TypoScript settings in an extension.
Extbase controllers
In Extbase controllers,
Flexform settings and TypoScript settings will be
merged together. If settings exists in both, the Flexform takes precedence and overrides the TypoScript setting.
Note that both Flexform and TypoScript settings must use the convention of preceding the setting with
settings. (for example,
settings.).
Extbase offers some advantages: Some things work automatically out-of-the-box. However, you must stick to the Extbase conventions ("conventions over configuration").
In order to access TypoScript settings from an Extbase controller.
-
Use the convention of defining your TypoScript settings in
settingsEXT:my_extension/Configuration/TypoScript/setup.typoscriptplugin.tx_myextension { view { # view settings } settings { key1 = value1 key2 = value2 } }Copied! -
Access them via
$this->settingsFor example, in your controller:
$myvalue1 = $this->settings['key1'] ?? 'default';Copied!
See also
Fluid
If Extbase controllers are used,
$this->settings is automatically passed to the
Fluid template. Allowing you to access settings like this:
{settings.key1}