adding smarty function for details output