typoscript2

Fusion (Typoscript 2): How to access a variable from a parent object?

左心房为你撑大大i 提交于 2020-01-15 10:36:47
问题 This is sort of a follow-up question for How to define and access local variable in Typoscript 2 (Neos)? If I define a local variable, called myLocalVar in the example below, how can I access it from other objects, in this case from Neos.Fusion:Case ? prototype(Some.Namespace:SomeNodeType) < prototype(TYPO3.Neos:Content) { myLocalVar = ${String.split(q(node).property('example'), '/', 2)} myResult = Neos.Fusion:Case { a = Neos.Fusion:Matcher { condition = ${???.myLocalVar[0] == 'aaa'} renderer

How to define and access local variable in Typoscript 2 (Neos)?

為{幸葍}努か 提交于 2019-12-12 02:12:01
问题 I have created a custom NodeType "Events" with a custom TS2 file in Neos, but I guess it is more a general question about Typoscript 2. prototype(Some.Namespace:Events) < prototype(TYPO3.Neos:Document) { ... sortOrder = ${request.arguments.sortOrder == 'asc' ? 'asc' : 'desc'} otherVariable = ${sortOrder} ... } Of course this is simplified to focus on the issue: I want to assign the value of the variable sortOrder (which is "asc" or "desc") to another variable named otherVariable . How can I