In Smarty, I want to be able to write {widget 15} or {widget id = 15}, so the output will be the return value of the PHP function
function widget($id){ echo 'hi '.$id; }
Is it possible?
Smarty makes it easy to create these custom functions: see the official link .
Source: https://habr.com/ru/post/1777652/More articles:Развертывание context.xml для webapps/[webappname]/META-INF - tomcatWhat is the best way to programmatically determine if TLabel is cropped (i.e. Drawn using ellipsis)? - ellipsisCOUNT (1) OVER () with Linq to Sql - sqlHow can I delete a file from a branch and return to the trunk version? - svnFiltering Unwanted Character Strings in Java - javaConvert BlackBerry InputStream to String - blackberryLightweight continuous integration server for .NET. - .netAccess Violation in a Multithreaded Application on Windows Server 2003 - arraysAndroid, how to get a list of applications that open a URL without using createChooser - androidThe "in" equivalent for comparing two Numpy arrays - pythonAll Articles