Thursday 09 November 2006 4:31:04 am
Hi, You can add php functions as template function from within the template.ini.append
[PHP]
# A list with php functions and their equivelant template operator names
# Giving the operators a different name from the PHP functions
# are recommended, that way you ensure that all operators follow
# the same naming guidelines. It also means that you can change the
# php function later on without doing template changes.
PHPOperatorList[]
PHPOperatorList[urlencode]=urlencode
The only problem is that you can then only use them as $blabla|urlencode() . If the php function you plan to use needs more than one parameter, then you need to write an extension. X+
http://www.sydesy.com
|