Hi together,
I try to get more overview in Fusion / TypoScript. So I used variables in my scripts. Like in this Post ( Variable in TypoScript 2 )
Most of the time it works with ease.
But when I try to define a variable outside of an fusion-path, within I loose the value and maybe the variable too.
#works:
//class has value of testNodeProperty within
prototype(Vendor.Site:TestNode) < prototype(TYPO3.Neos:Content) {
testVari = ${q(node).property('testNodeProperty')}
class = ${this.testVari}
}
```
#does NOT work:
// attributes.class has no value within
prototype(Vendor.Site:TestNode) < prototype(TYPO3.Neos:Content) {
testVari = ${q(node).property(‘testNodeProperty’)}
attributes {
class = ${this.testVari}
}
}
Simple Example: In real there are more calculations, if-then's, preg_replace ... With ${this.testVari} I would win more overview and simplicity.
***How could I use this.-syntax also in encapsulated (path-)situations?***
<small>Or should it work and there must be an error in my script?</small>