Smarty syntax is limited in terms of where expressions are allowed, so you probably will have to assign the sum to a temporary variable:
{assign var=_sum value=$v[brand]+$v[brand2]}
<a href="{'smartphone'|buildLink:$k:$_sum}"
سؤال
how to combine two variables(array vals) in a modifier?
this works:
<a href="{'smartphone'|buildLink:$k:$v["brand"]}">
but this will not??
<a href="{'smartphone'|buildLink:$k:$v["brand"]+$v["brand2"]}"
المحلول
Smarty syntax is limited in terms of where expressions are allowed, so you probably will have to assign the sum to a temporary variable:
{assign var=_sum value=$v[brand]+$v[brand2]}
<a href="{'smartphone'|buildLink:$k:$_sum}"