I need in smarty template to transmit to开发者_JS百科 function concatenated string constant with variable value, How can i do it?
some example code:
{$obj->calledFunc('string const').$var}
but . operator doesn't work
Use the cat modifier:
{$obj->calledFunc('string const')|cat:$var}
You can use concatenation like this:
{'my_string'|cat:$my_variable|cat:'concat_string'}
精彩评论