#17823 Import/Export doesn't export the Display Name of a content type

--HG--
branch : 1.x
This commit is contained in:
Suha Can
2011-05-26 11:29:44 -07:00
parent ee35e138a3
commit 9c6e953ba7

View File

@@ -12,7 +12,10 @@ namespace Orchard.ContentManagement.MetaData.Services {
public XElement Export(ContentTypeDefinition typeDefinition) {
var typeElement = NewElement(typeDefinition.Name, typeDefinition.Settings);
if (typeElement.Attribute("DisplayName") == null && typeDefinition.DisplayName != null) {
typeElement.Add(new XAttribute("DisplayName", typeDefinition.DisplayName));
}
foreach(var typePart in typeDefinition.Parts) {
typeElement.Add(NewElement(typePart.PartDefinition.Name, typePart.Settings));
}