Dynamic variable in Gallery-template?
Posted: Fri Jul 25, 2025 12:35 pm
In my Gallery-galleries, I am using thee custom fields "description_en", "description_de" and "description_nl" to be able to have language-specific descriptions. Now I'm trying to deal with these in the Gallery-template "automatically" (i.e. dependent on a global $lang variable).
Based on what I could find e.g. here in the forum (viewtopic.php?t=72290), I would expect something like this to work: {$fields.description_{$lang}.value} - however, when I try to use a construct like that in my Gallery-template, I'm getting an "OOOPS" with the error 'Unexpected "{", expected one of: "}"'. I'm probably missing something obvious - anyone who can point out the error in my ways?
Based on what I could find e.g. here in the forum (viewtopic.php?t=72290), I would expect something like this to work: {$fields.description_{$lang}.value} - however, when I try to use a construct like that in my Gallery-template, I'm getting an "OOOPS" with the error 'Unexpected "{", expected one of: "}"'. I'm probably missing something obvious - anyone who can point out the error in my ways?
