I've got a parent template which contains the following code:
{% include '_layout' with {'countryCode': 'au'} %}
I have a global set with the handle au_Variables
, and within that a field with the handle vimeoVideoId_au
The problem I'm having is with trying to render the following global: {{ au_Variables.vimeoVideoId_au }}
dynamically, using the countryCode.
I've tried
{% set videoId = countryCode~'_Variables.vimeoVideoId_'~countryCode %}
And then outputting {{ videoId }}
but all I get is the string au_Variables.vimeoVideoId_au
, not the rendered global.
Any ideas how to do this in Twig?