I love Smarty. Very easy to use. All built out and ready to go. It would be a wonderful addition.
https://www.smarty.net/docsv2/en/language.function.if