ENXF NET
Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
		- Joined
 - Nov 13, 2018
 
- Messages
 - 29,585
 
- Points
 - 823
 
Reputation:
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!!
Continue reading...
	
		
			
		
		
	
			
			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!!
Continue reading...