|
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 |
gianiaz Smarty Rookie
Joined: 14 Dec 2006 Posts: 25 Location: Italy
|
Posted: Sun Feb 09, 2014 11:15 am Post subject: [smarty3] Custom plugin pass attribute with var |
|
|
I'm upgrading to smarty3 from smarty2.
In smarty2 I use a custom plugin wrote from me, and I use this syntax in tpl:
Code: |
{mycustomplugin attribute=name_$Lang}
|
and in the plugin i receive "name_IT", "name_EN" ecc
In smarty3 this syntax fires this error:
Quote: |
Unexpected "$", expected one of: "}" <-- thrown in /media/ext/www/****/public_html/lib/Smarty-3.1.16/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 60
|
I've also tried with:
Code: |
{mycustomplugin attribute="name_$Lang"}
{mycustomplugin attribute=name_`$Lang`}
|
but none works.
Any help?
Thank you |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun Feb 09, 2014 4:16 pm Post subject: |
|
|
Code: | {mycustomplugin attribute="name_$Lang"} |
does work in Smarty3. What happens if you use it? |
|
Back to top |
|
gianiaz Smarty Rookie
Joined: 14 Dec 2006 Posts: 25 Location: Italy
|
Posted: Sun Feb 09, 2014 6:26 pm Post subject: |
|
|
Sorry, too many test and I did't see that the error was fired from another attribute without the quotes.
Thank you |
|
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
|