Feature #42614
closedcondition for treeLevel does not support comparisons other than equal
0%
Description
The treeLevel-condition only supports equal-check against one or more values
Not working:
[treeLevel > 0]
Workaround:
[treeLevel = 1,2,3,4,5]
Also not working:
[treeLevel < 3]
[treeLevel != 1]
Updated by Stefan Neufeind about 12 years ago
t3lib/matchcondition/class.t3lib_matchcondition_frontend.php in evaluateCondition()
There some fields are just checked against one or more values. However no "larger" or something the like is supported.
One possible solution that that might be easy to implement would be something like:
[treeLevel = >0]
Multiple values are checked with "or" so it would then be possible to check if for example "below 2 or above 5":
[treeLevel = <2,>5]
Updated by Stefan Neufeind about 12 years ago
Workaround for unequals: [PIDinRootline != 7]
is to negate it:
[PIDinRootline = 7]
[else]
...
[global]
Updated by Thorsten Kahler about 12 years ago
- Tracker changed from Bug to Feature
- Target version set to 6.1.0
This is the documented behaviour so doesn't qualify as a bug and can't be changed before version 6.1.
Updated by Mathias Schreiber almost 10 years ago
- Target version changed from 6.1.0 to 7.2 (Frontend)
Updated by Benni Mack over 9 years ago
- Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Benni Mack about 6 years ago
- Status changed from New to Closed
We've implemented a new TypoScript condition in v9 LTS based on ExpressionLanguage, which now allows for handling treeLevel properly. [tree.level > 2] should do the trick now.