Custom smarty function without identifiers? -


is possible create smarty functions accept shorthands or, more specifically, variables without identifiers?

i have function takes object , returns string; i'm writing:

{myfunc source=$object}

i want able write {myfunc $object} without smarty squawking missing identifiers, don't know begin. it's entirely possible i'm missing fundamental fact makes impossible. if that's case, i'd know too.

without knowing myfunc's purpose be, believe modifier plugin looking for. these great taking string , formatting in way, taking timestamp , formatting in way wanted.

variable modifiers can applied variables, custom functions or strings. apply modifier, specify value followed | (pipe) , modifier name. modifier may accept additional parameters affect behavior. these parameters follow modifier name , separated : (colon). also, php-functions can used modifiers implicitly (more below) , modifiers can combined.

source

then in template like

{$object|myfunc} 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -