Re: [SMARTY-DEV] Simple math
| From: | Konstantin | Date: | Fri, 20 Jun 2003 10:06:21 +0000 |
| Subject: | Re: [SMARTY-DEV] Simple math | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9742@lists.php.net to get a copy of this message | ||
Hi!
> {math assign="pages" equation="n/4" n=$items|@count}
>
> but please, please keep this kind of logic out of the
> template.
First, this time I can't.
Second, it's template designer's decision on how many items
to show on page.
> read
> http://smarty.php.net/manual/en/language.modifiers.php on
> why it has to read @count and not count.
Thank you, sorry for this question.
Anyway, I'd like to have simple math in simple syntax in
next Smarty version, or at least, {math} as a compiler
function.
Konstantin A. Pelepelin