Site settings
Changed in version 12.1
Before TYPO3 v12.1 the site settings were stored in the config.
file under the settings
key. An upgrade wizard copies the settings
to the new settings.
file.
Settings are not removed from the config.
file for now, but will
not have any effect anymore as soon as a settings.
file exists.
Please review your settings in the config.
file and remove them
manually. Eventually, you need and/or want to adopt your deployment
workflow.
Site settings can be used to provide settings for a site. They can be accessed via
- the \TYPO3\CMS\Core\Site\Entity\Site object in frontend and backend context using PHP
- the siteSettings key of the data function in TypoScript
- constants in TypoScript or page TSconfig
- as variables (for example,
{site.
) in Fluid templates using theconfiguration. settings. my Setting Key} Site
, see Using site configuration in TypoScript and Fluid templates.Processor data processor
For instance, settings can be used in custom frontend code to deliver features which might vary per site for extensions. An example may be to configure storage page IDs.
The settings are defined in the config/
file.
Adding site settings
Add settings to the settings.
:
Note
This example shows how to fill a constant of
EXT:felogin via site settings
(styles.
) and configures a custom
category
.
Accessing site settings in page TSconfig or TypoScript
// store tx_ext_data records on the given storage page by default (e.g. through IRRE)
TCAdefaults.tx_ext_data.pid = {$categoryPid}
// load category selection for plugin from out dedicated storage page
TCEFORM.tt_content.pi_flexform.ext_pi1.sDEF.categories.PAGE_TSCONFIG_ID = {$categoryPid}
Note
The TypoScript constants are evaluated in this order:
- Configuration from $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_constants']
- Site specific settings from the site configuration
- Constants from
sys_
database recordstemplate