Re: [SMARTY] modifiers functions
| From: | Matt Warden | Date: | Sun, 13 Mar 2005 02:03:40 +0000 |
| Subject: | Re: [SMARTY] modifiers functions | ||
| References: | 1 2 3 4 5 6 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-12323@lists.php.net to get a copy of this message | ||
On Sun, 13 Mar 2005 03:58:41 +0200, Werner <nospam@ubertech.co.za> wrote:
> Hi Matt
>
> Yes, that's the easy way, the php-way :-) I just got the impression that
> Nayra wanted to know how to do it the smarty-way, which made it quite
> interesting.
Well, the point is just that they are one in the same. See:
http://smarty.php.net/manual/en/language.modifiers.php
"Additionally all php-functions can be used as modifiers implicitly.
(The @count-example above actually uses php's count-function and not a
smarty-modifier)."
So, you can use str_pad directly in Smarty templates, as if it were a
Smarty(-only) variable modifier.
Still, yes, your solution is an interesting one.
--
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.