|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
cjxxi Smarty Regular
Joined: 03 Aug 2007 Posts: 40 Location: Fort Worth,Texas
|
Posted: Sat Feb 26, 2011 12:06 pm Post subject: passing a string |
|
|
passing a string..
I know this must be simple, but I just ran into this:
in the template i have a link:
{link url="some_link/$string"}
why is string not being evaluates as its current value?.
Also this:
{link url="some_link/$item.id"}
what would be the proper way?. _________________ CJAX THE PHP AJAX FRAMEWORK AT CJAX.NET |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Sat Feb 26, 2011 12:36 pm Post subject: |
|
|
In Smarty 2 you can do {link url="some_link/`$string`"} - note the backticks ` (you may have encountered in MySQL). In Smarty 3 you can also do {link url="some_link/{$string}"}, which may be a bit more intuitive |
|
Back to top |
|
cjxxi Smarty Regular
Joined: 03 Aug 2007 Posts: 40 Location: Fort Worth,Texas
|
Posted: Sat Feb 26, 2011 6:16 pm Post subject: |
|
|
globe wrote: | In Smarty 2 you can do {link url="some_link/`$string`"} - note the backticks ` (you may have encountered in MySQL). In Smarty 3 you can also do {link url="some_link/{$string}"}, which may be a bit more intuitive |
Thanks _________________ CJAX THE PHP AJAX FRAMEWORK AT CJAX.NET |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|