2

I have 3 sets of globals, which use the same fields handles.

{{ firstGlobalHandle.aFieldHandle }}
{{ secondGlobalHandle.aFieldHandle }}
{{ thirdGlobalHandle.aFieldHandle }}

In a child template, I set a variable corresponding to the handle of the global group which I need to call

{% set globalHandle = "secondGlobalHandle" %}

Now in the In the parent template, I would like to do the following :

{{ '{{ globalHandle }}'.aFieldHandle }}

Is there any way to do so ?

laurent
  • 171
  • 6

1 Answers1

2

OK, my bad, this was answered here

Here is the solution :

{{ _context[ globalHandle ].aFieldHandle }}
laurent
  • 171
  • 6