Merge pull request #227 from mattbrailsford/6.2.0-3454
Maintains tab sort order for doc type imports/exports.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user