example: add smarty block function