Benjamin Gries
Benjamin Gries

Reputation: 81

Using constants of site config in TypoScript conditions

In TYPO3 10 LTS it is possible to set constants in the site config and use them in typoscript (see here: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/SiteHandling/UseSiteInTypoScript.html)

I was wondering if I can also use the constants in typoscript and tsconfig conditions, e.g.

[page["pid"] == "{$site.settings.uids.privacy}"] 
    here goes the typoscript configuration for the conditon
[END]

I set the constants in the site config this way:

rootPageId: 1
(...)
settings:
  uids:
    privacy: 124
    meta: 127

Any ideas?

Upvotes: 1

Views: 499

Answers (1)

Benjamin Gries
Benjamin Gries

Reputation: 81

Just read the changelog, Benjamin. :D

It is possible, for further information please take a look: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.4/Feature-91080-SiteSettingsAsTsConstantsAndInTsConfig.html.

Above example would look like:

[page["pid"] == "{$uids.privacy}"] 
    here goes the typoscript configuration for the conditon
[END]

Upvotes: 2

Related Questions