Add editor ui alias to package xml (#16420)
* Add editor ui alias to package xml * Update src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs * Add AllowAtRoot and AllowInAreas --------- Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
This commit is contained in:
@@ -26,6 +26,10 @@ public class BlockGridConfiguration
|
||||
public Guid ContentElementTypeKey { get; set; }
|
||||
|
||||
public Guid? SettingsElementTypeKey { get; set; }
|
||||
|
||||
public bool AllowAtRoot { get; set; }
|
||||
|
||||
public bool AllowInAreas { get; set; }
|
||||
}
|
||||
|
||||
public class NumberRange
|
||||
|
||||
@@ -211,6 +211,7 @@ internal class EntityXmlSerializer : IEntityXmlSerializer
|
||||
|
||||
// The 'ID' when exporting is actually the property editor alias (in pre v7 it was the IDataType GUID id)
|
||||
xml.Add(new XAttribute("Id", dataType.EditorAlias));
|
||||
xml.Add(new XAttribute("EditorUiAlias", dataType.EditorUiAlias ?? dataType.EditorAlias));
|
||||
xml.Add(new XAttribute("Definition", dataType.Key));
|
||||
xml.Add(new XAttribute("DatabaseType", dataType.DatabaseType.ToString()));
|
||||
xml.Add(new XAttribute("Configuration", _configurationEditorJsonSerializer.Serialize(dataType.ConfigurationObject)));
|
||||
|
||||
@@ -1257,12 +1257,15 @@ namespace Umbraco.Cms.Infrastructure.Packaging
|
||||
editor = new VoidEditor(_dataValueEditorFactory) {Alias = editorAlias ?? string.Empty};
|
||||
}
|
||||
|
||||
var editorUiAlias = dataTypeElement.Attribute("EditorUiAlias")?.Value?.Trim() ?? editorAlias;
|
||||
|
||||
var dataType = new DataType(editor, _serializer)
|
||||
{
|
||||
Key = dataTypeDefinitionId,
|
||||
Name = dataTypeDefinitionName,
|
||||
DatabaseType = databaseType,
|
||||
ParentId = parentId
|
||||
ParentId = parentId,
|
||||
EditorUiAlias = editorUiAlias,
|
||||
};
|
||||
|
||||
var configurationAttributeValue = dataTypeElement.Attribute("Configuration")?.Value;
|
||||
|
||||
Reference in New Issue
Block a user