Site settings

New in version 13.1

Site settings can receive a type, a default value and some documentation in site settings definitions. It is recommended to always define a site setting before using it, as only this way you can ensure proper types and default values.

Site settings can be used to provide settings for a site. They can be accessed via

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/sites/<my_site>/settings.yaml file.

Adding site settings

Add settings to the settings.yaml:

config/sites/<my_site>/settings.yaml | typo3conf/sites/<my_site>/settings.yaml
categoryPid: 658
styles:
  content:
    loginform:
      pid: 23
Copied!

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}
Copied!