|
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 |
gehegeradeaus Smarty n00b
Joined: 26 Aug 2011 Posts: 2
|
Posted: Fri Aug 26, 2011 1:49 pm Post subject: math and modifier |
|
|
In smarty 2 I could do the following without any problem:
{$var|@count + 1}
However, in Smarty 3 this results in an error:
Syntax Error in template "application/modules/admin/resources/templates/AdminListColumns.tpl" on line 20 "{$var|count+1}" - Unexpected "+", expected one of: "}
I don't seem to find any reason in the BC document, but maybe I'm overlooking something? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Aug 26, 2011 1:58 pm Post subject: |
|
|
Try this:
{($var|@count)+1}
You don't need the @ with Smarty 3 either. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Aug 27, 2011 1:27 pm Post subject: |
|
|
This syntax problem has been fixed now in the Smarty_3_1_DEV SVN branch |
|
Back to top |
|
gehegeradeaus Smarty n00b
Joined: 26 Aug 2011 Posts: 2
|
Posted: Mon Aug 29, 2011 8:45 am Post subject: |
|
|
Thanks for the fix |
|
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
|