Add view rendering function.