Orit
Active member
Hi
Is there a way to use a variable inside a phrase?
I mean doing something like this:
I have a list of phrases:
classifieds_listing_field_choice.town_A01
classifieds_listing_field_choice.town_A02
classifieds_listing_field_choice.town_A03
I want to show them in the template using the A0* part which is determined as a variable:
{{ phrase('classifieds_listing_field_choice.town_{$listing.custom_fields.town}) }}
but get a syntax error.
Is there a different way to do this?
Thanks!!
Is there a way to use a variable inside a phrase?
I mean doing something like this:
I have a list of phrases:
classifieds_listing_field_choice.town_A01
classifieds_listing_field_choice.town_A02
classifieds_listing_field_choice.town_A03
I want to show them in the template using the A0* part which is determined as a variable:
{{ phrase('classifieds_listing_field_choice.town_{$listing.custom_fields.town}) }}
but get a syntax error.
Is there a different way to do this?
Thanks!!