Attention
TYPO3 v8 has reached its end-of-life March 31st, 2020 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
There is no further ELTS support. It is recommended that you upgrade your project and use a supported version of TYPO3.
Conditions¶
It is possible to use TypoScript conditions in both User TSconfig and Page TSconfig, just as it is done in TypoScript for templates.
Examples¶
[treeLevel = 1]
TCEFORM.tt_content.section_frame.disabled = 1
[GLOBAL]
The above TSconfig will hide the "section_frame" field of content elements only on the first level of the page tree.
Differences to conditions in TypoScript templates¶
There are some slight differences between conditions in TSconfig and conditions in TypoScript templates, which must be taken into account:
Conditions "usergroup" and "loginUser" apply to BE groups and BE users – respectively – and not to FE groups and FE users, quite obviously.
In the "globalString" condition, key "TSFE:" will not work because the TSFE global object only exists in the FE context. The "LIT:" key will not work either as it is used to compare TypoScript constants, which are not available in the BE context.
Note that conditions such as "PIDupinRootline" or "treeLevel" will apply correctly to pages that are being created but are not yet saved.
You can use custom conditions, though.
[BigCompanyName\TypoScriptLovePackage\MyCustomTypoScriptCondition = 7]
Furthermore the following condition is available only in TSconfig:
References¶
For a general discussion about TypoScript conditions, please refer to TypoScript Conditions in "TYPO3 Explained".
For a list of available conditions, please refer to the Conditition Reference in the "TypoScript Templating Reference".