Re: [SMARTY] modifiers functions

From: Date: Sun, 13 Mar 2005 02:31:16 +0000
Subject: Re: [SMARTY] modifiers functions
References: 1 2 3 4 5 6 7  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12324@lists.php.net to get a copy of this message
Hi, again! Now *that's* interesting! Thanks for pointing it out, it will make my life a bit easier from now on. I suppose I should have read the manual more thoroughly :-) BTW: Try calling @str_pad as a variable modifier, and try to specify " " as the pad string. Also try to specify one of the pad_type options. Do you also get weird output? (I'm using version 2.6.6). Cheerios, Werner Matt Warden wrote:
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.


« previous php.smarty.general (#12324) next »