Hi.
I’m trying to get the pages in collection through their taxonomy filter. I have this code in a twig template:
{% for page in page.evaluate({'@taxonomy.category':'featured'}).order('date', 'desc') %}
I’d like to change ‘featured’ to a translated string, like this:
{{'THEME_NAME.TAXONOMY_TAGS.FEATURED'|t}}
( THEME_NAME.TAXONOMY_TAGS.FEATURED is a variable configured in languages.yaml translated into two languages. )
I get the following error:
A hash value must be followed by a comma. Unexpected token “name” of value “TAXONOMY_TAGS_FEATURED” (“punctuation” expected with value “,”).
Is there anyway to use translated variables in taxonomy filters?
Thanks in advanced.