Using Site Config in Conditions

Site configuration may be used in all conditions that use Symfony Expression language Typo3ConditionFunctionsProvider - at the moment this means in EXT:form variants and TypoScript conditions.

Two objects are available: site and siteLanguage. With site you can access the properties of the top level site configuration. siteLanguage accesses the configuration of the current site language.

TypoScript Examples

The identifier of the site name is evaluated:

[site("identifier") == "someIdentifier"]
    page.30.value = foo

Property of the current site language is evaluated:

[siteLanguage("locale") == "de_CH.UTF-8"]
    page.40.value = bar

EXT:form Examples

Translate options via siteLanguage condition:

    type: Page
    identifier: page-1
    label: DE
    previousButtonLabel: 'zurück'
    nextButtonLabel: 'weiter'
        identifier: language-variant-1
        condition: 'siteLanguage("locale") == en_US.UTF-8'
        label: EN
        previousButtonLabel: 'Previous step'
        nextButtonLabel: 'Next step'