https://www.hardware.com.br/comunidade/smarty-template/139329
Smarty, só dá pra fazer assim?