update template inheritance relationship