From 17453595bf5d42ee8004f2568b8558aa5c90f648 Mon Sep 17 00:00:00 2001 From: pete_morgan Date: Sat, 25 Mar 2006 09:22:56 +0000 Subject: [PATCH] made more of a point of php functions as modifiers --- docs/en/designers/language-modifiers.xml | 43 +++++++++++++++--------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/docs/en/designers/language-modifiers.xml b/docs/en/designers/language-modifiers.xml index 91660b19..9fb48335 100644 --- a/docs/en/designers/language-modifiers.xml +++ b/docs/en/designers/language-modifiers.xml @@ -3,34 +3,48 @@ Variable Modifiers - Variable modifiers can be applied to variables, custom functions or strings. To - apply a modifier, specify the value followed by the | + Variable modifiers can be applied to + variables, + custom functions or strings. To + apply a modifier, specify the value followed by a | (pipe) and the modifier name. A modifier may accept additional parameters that affect its behavior. These parameters follow the modifer name and are - separated by : (colon). + separated by a : (colon). Additionally + all php-functions can be used as modifiers implicitly; more below. - modifier example + modifier examples @@ -44,16 +58,15 @@ Modifiers can be autoloaded from your $plugins_dir (also see: - Naming - Conventions) or can be registered explicitely (see: register_modifier). + linkend="variable.plugins.dir">$plugins_dir + or can be registered explicitely with register_modifier(). + - Additionally - all php-functions can be used as modifiers implicitly. (The + All php-functions can be used as modifiers implicitly. (The @count example above actually uses php's count() function and not a smarty-modifier). Using php-functions - as modifiers has two little pitfalls: First: Sometimes the order + as modifiers has two little pitfalls: Firstly: Sometimes the order of the function-parameters is not the desirable one ({"%2.f"|sprintf:$float} actually works, but asks for the more intuitive. For example:{$float|string_format:"%2.f"}