diff --git a/docs/en/designers/language-modifiers.xml b/docs/en/designers/language-modifiers.xml index 9fb48335..aa0ca98c 100644 --- a/docs/en/designers/language-modifiers.xml +++ b/docs/en/designers/language-modifiers.xml @@ -38,7 +38,7 @@ {mailto|upper address='smarty@example.com'} {* using php's str_repeat *} -{'=':str_repeat:80} +{'='|str_repeat:80} {* php's count *} {$myArray|@count} @@ -57,24 +57,26 @@ elements in the $articleTitle array.) - Modifiers can be autoloaded from your $plugins_dir or can be registered explicitely with register_modifier(). + linkend="api.register.modifier">register_modifier(); + this is useful for sharing a function in a php script and smarty templates. + 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: Firstly: Sometimes the order + as modifiers has two little pitfalls: First; 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"} - that is provided by the Smarty distribution). Second: with $security turned on all + that is provided by the Smarty distribution). Second; with $security enabled all php-functions that are to be used as modifiers have to be declared trusted in the - $security_settings['MODIFIER_FUNCS']-array. + $security_settings['MODIFIER_FUNCS'] array. See also