convert template to partial