added method to render a template view