Michael Ransburg
Michael Ransburg

Reputation: 1

Access array variable starting with "@" in TYPO3 Fluid?

Is there any way to access an (array) variable which name starts with an "@" directly inside a TYPO3 fluid template? I tried everything I could think of, but it did not work. In PHP I could get it to work using a syntax like "->{'@graph'}", but I could not find any way in Fluid. Does anyone know of a way to directly access this with fluid?

Example for array variables starting with @

Upvotes: 0

Views: 229

Answers (1)

Claus Due
Claus Due

Reputation: 4261

The only way currently is via a ViewHelper, for example v:variable.get from VHS. This ViewHelper supports arbitrary variable names as long as they are possible to store in the array of variables you assign to Fluid: https://viewhelpers.fluidtypo3.org/fluidtypo3/vhs/5.0.1/Variable/Get.html

Upvotes: 1

Related Questions