Issue Bug Closed

#103875Conditions are ignored in sys template

Florian Rival 05/22/24, 10:06 updated 07/09/24, 15:35

Description

If I have a TypoScript file included with a condition in sys_template , field config , like that:

<INCLUDE_TYPOSCRIPT: source="DIR:EXT:my_ext/Configuration/TypoScript/" condition="[tree.level >= 2]">

or even like this :

[tree.level >= 2]
   @import 'EXT:my_ext/Configuration/TypoScript/*.typoscript'
[END]

the condition is not applied and the TypoScript is always applied (i.e. the file is always included).

If I set the same condition inside the TypoScript file itself then the condition work as expected.

[tree.level >= 2]
    lib.myVariable = TEXT
    lib.myVariable.value = IT WORKS
[END]

The conditions defined in sys_template field config are not event displayed in module “TypoScript > Active TypoScript > Setup > Conditions”.

Reviews 2