views:

146

answers:

2

In template I have two strings which I want to combine in one.

{assign var="bigUrl" value="Search?searchFor=Member&{$searchUrl}"}

To be able to use variable {$bigUrl} below in template, like this:

<a href={$bigUrl}>Link</a>

When I write mentioned assignment smarty compiler report error:

syntax error: invalid attribute name: '='
+1  A: 

You can't use braces inside smarty tags. Just remove them:

{assign var="bigUrl" value="Search?searchFor=Member&$searchUrl"}

Or use cat filter:

{$bigUrl|cat:$searchUrl}
Ivan Nevostruev
A: 

I'm not sure this is it, but in the Smarty manual all {assign}s are in single quotes. The error message would make sense if those don't work.

Can you try replacing the double quotes?

Pekka
This doesn't helped.
Vladimir