| Jan H. Andersen 2005-02-01, 4:01 pm |
| Yes. The array-issues are clearly explained, but an example of the modifier
used on a parameter will be very usefull to many users, IMHO.
/Jan
-----Oprindelig meddelelse-----
Fra: Monte Ohrt [mailto:monte@newdigitalgroup.com]
Sendt: 1. februar 2005 18:37
Til: Jan H. Andersen
Cc: smarty-general@lists.php.net
Emne: Re: SV: [SMARTY] modifiers
OK, so adding an example of applying a modifier to a function parameter
would be sufficient?
The application of a modifier to an array is explained already:
http://smarty.php.net/manual/en/language.modifiers.php
"If you apply a modifier to an array variable instead of a single value
variable, the modifier will be applied to every value in that array. If
you really want the modifier to work on an entire array as a value, you
must prepend the modifier name with an @ symbol like so:
{$articleTitle|@count} (this will print out the number of elements in
the $articleTitle array.)"
Jan H. Andersen wrote:
>Hello,
>
>I have to defend Pete now :-) It is not in any way clearly stated in the
>manual, that you can apply modifiers directly on parameters when calling a
>function - although it is very convenient to know...
>
>
>/Jan
>
>-----Oprindelig meddelelse-----
>Fra: Monte Ohrt [mailto:monte@ohrt.com]
>Sendt: 1. februar 2005 18:12
>Til: pete M; smarty-general@lists.php.net
>Emne: Re: [SMARTY] modifiers
>
>
>How do you mean? In your example you are applying a modifier to a
>parameter, although you can apply them to functions:
>
>{myfunc|mymod param="foo"}
>
>which is documented on that page too....
>
>Monte
>
>pete M wrote:
>
>
>
>
>--
>Smarty General Mailing List (http://smarty.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
|