change smarty textarea block into function