Re: [SMARTY] Smarty - Math
| From: | messju mohr | Date: | Sat, 25 Oct 2003 20:05:12 +0000 |
| Subject: | Re: [SMARTY] Smarty - Math | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-10424@lists.php.net to get a copy of this message | ||
On Sat, Oct 25, 2003 at 03:26:57PM -0400, Jason Hubble wrote:
> I need to be able to add two numbers togher in a template but it doesn't seem
> to be working.
the math-operators are only available since
Smarty-2.6.0. unfortunately, the manual is missing this notice.
try Smarty-2.6.0-RC2 if you dare or use the {math}-plugin which works
with 2.5.0 and older.
greetings
messju
> Here is the error I get:
> Fatal error: Smarty: [in edit_layout.html line 9]: syntax error: unrecognized
> tag: $foo*1 (Smarty_Compiler.class.php, line 382) in
> /usr/local/lib/php/Smarty_Compiler.class.php on line 1824
>
> it would be the same error if I tried to add one except where it says $foo*1
> it would say $foo+1.
>
>
> Here is the document that makes me think what I'm doing should work:
> http://smarty.php.net/manual/en/language.math.php
>
> Here is what I typed in looks like in the template:
> {$foo*1}
>
> Thanks for your help!
>
> jason
>
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php