user1163513 user1163513 - 6 months ago 58
Smarty Question

Concatenation in smarty

I want to assign the value obtained from the concatenation of these two variables with a string.

{assign var="url" value="{$WS_PATH}aircraft_images/{$images[i].image}"}

Please let me know how can we do this in smarty.


One of these should work:

{assign var="url" value=$WS_PATH|cat:"aircraft_images/"|cat:$images[i].image}


{assign var="url" value="`$WS_PATH`aircraft_images/`$images[i].image`"}

I am not sure if the $images[i].image will be parsed correctly, you may have to {assign} it to another variable first