only check parent.template if parent is set.