Smarty and Href

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Whenever I put in a smarty variable in a link definition as :

<a href="">foo</a>,

it shows up as a literal as above in the link and not the contents of  
the variable itself. Everywhere else in the template .. variable  
substitution works fine.

Any help appreciated.

Re: Smarty and Href

J Huntley Palmer wrote:
Quoted text here. Click to load it

Turn on error_reporting(E_ALL).
If $foo->bar doesn't exist it will give you an error of E_NOTICE level. If
it does exist, I wouldn't know with this little piece what the problem could

Rik Wasmus

Re: Smarty and Href

*** J Huntley Palmer escribió/wrote (Mon, 03 Jul 2006 22:40:44 -0400):
Quoted text here. Click to load it

"Smarty will recognize assigned  variables  embedded in double quotes so
long as the variables contain only numbers, letters, underscores and
brackets []. With any other characters (period, object reference, etc.) the
variable must be surrounded by backticks."

Hope this helps

-+ - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web:
+- Mi web de humor con rayos UVA:

Site Timeline