Change templates from tree