Add port numbers to template