In Smarty i want to be able to write {widget 15} or {widget id=15} , so the output will be the return value of PHP function
function widget($id){
echo 'hi '.$id;
}
is it possible ?
Smarty allows you to create such custom functions easily: see the official reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With