Issue Feature Closed

#29168Enable constants in conditions in TypoScript templates

Simon Schaufelberger 08/22/11, 18:05 updated 01/28/15, 13:51

Description

Right now, it is not possible to write something like this:

[PIDinRootline = LIT:{$tsconstant}]
# ...
[end]

Changing the check to:

case 'PIDinRootline':
$value = $this->getVariable(trim($value));
$values = t3lib_div::trimExplode(',', $value, TRUE);
if (($key == 'PIDinRootline') || (!in_array($this->pageId, $values))) {
    foreach ($values as $test) {
        foreach ($this->rootline as $rl_dat) {
            if ($rl_dat['uid'] == $test) {
                return TRUE;
            }
        }
    }
}

would solve that problem in t3lib/matchcondition/class.t3lib_matchcondition_frontend.php just for this case. of course this could be changed in other conditions as well.

Reviews 1