add the function to delete template.