I have a variable with a name, for example. var1which matters value1as a string. How to print the value of a variable var1, where it var1turns out as a string?
Let be
{{ set container = 'var1' }}
The value of the variable containeris dynamic. Depending on the value, containerI need to print its value; in this case I need to type "value1".
I'm looking for something like this
{{ attribute(this, container) }}/ * <= This will not be, as it is thisnot defined in Twig * /
source
share