diff --git a/src/Umbraco.Core/Services/PackagingService.cs b/src/Umbraco.Core/Services/PackagingService.cs index 951a9f95da..150bf23da3 100644 --- a/src/Umbraco.Core/Services/PackagingService.cs +++ b/src/Umbraco.Core/Services/PackagingService.cs @@ -586,9 +586,18 @@ namespace Umbraco.Core.Services { var id = tab.Element("Id").Value;//Do we need to use this for tracking? var caption = tab.Element("Caption").Value; + if (contentType.PropertyGroups.Contains(caption) == false) { contentType.AddPropertyGroup(caption); + + int sortOrder; + if(tab.Element("SortOrder") != null && + int.TryParse(tab.Element("SortOrder").Value, out sortOrder)) + { + // Override the sort order with the imported value + contentType.PropertyGroups[caption].SortOrder = sortOrder; + } } } } diff --git a/src/umbraco.cms/businesslogic/web/DocumentType.cs b/src/umbraco.cms/businesslogic/web/DocumentType.cs index 31d5d89e14..154e374c04 100644 --- a/src/umbraco.cms/businesslogic/web/DocumentType.cs +++ b/src/umbraco.cms/businesslogic/web/DocumentType.cs @@ -547,6 +547,7 @@ namespace umbraco.cms.businesslogic.web var tabx = xd.CreateElement("Tab"); tabx.AppendChild(XmlHelper.AddTextNode(xd, "Id", propertyTypeGroup.Id.ToString())); tabx.AppendChild(XmlHelper.AddTextNode(xd, "Caption", propertyTypeGroup.Name)); + tabx.AppendChild(XmlHelper.AddTextNode(xd, "SortOrder", propertyTypeGroup.SortOrder.ToString())); tabs.AppendChild(tabx); } }