Minor blueprints cleanup.

This commit is contained in:
Sipke Schoorstra
2016-02-19 13:56:02 +01:00
parent cc470d6e83
commit a1e5102fa9
3 changed files with 10 additions and 17 deletions

View File

@@ -1,8 +1,4 @@
using Orchard.ContentManagement;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Orchard.Layouts.Framework.Drivers {
public class ImportContentSessionWrapper : IContentImportSession {

View File

@@ -52,22 +52,20 @@ namespace Orchard.Layouts.Recipes.Builders {
var exportLayoutContext = new ExportLayoutContext();
_elementManager.Exporting(baseElements, exportLayoutContext);
_elementManager.Exported(baseElements, exportLayoutContext);
var root = new XElement("CustomElements");
context.RecipeDocument.Element("Orchard").Add(root);
foreach (var bluprintEntry in blueprintEntries) {
foreach (var blueprintEntry in blueprintEntries) {
root.Add(new XElement("Element",
new XAttribute("ElementTypeName", bluprintEntry.Blueprint.ElementTypeName),
new XAttribute("BaseElementTypeName", bluprintEntry.Blueprint.BaseElementTypeName),
new XAttribute("ElementDisplayName", bluprintEntry.Blueprint.ElementDisplayName),
new XAttribute("ElementDescription", bluprintEntry.Blueprint.ElementDescription ?? ""),
new XAttribute("ElementCategory", bluprintEntry.Blueprint.ElementCategory ?? ""),
new XAttribute("BaseExportableData", bluprintEntry.BaseElement.ExportableData.Serialize()),
new XElement("BaseElementState", new XCData(bluprintEntry.Blueprint.BaseElementState))));
new XAttribute("ElementTypeName", blueprintEntry.Blueprint.ElementTypeName),
new XAttribute("BaseElementTypeName", blueprintEntry.Blueprint.BaseElementTypeName),
new XAttribute("ElementDisplayName", blueprintEntry.Blueprint.ElementDisplayName),
new XAttribute("ElementDescription", blueprintEntry.Blueprint.ElementDescription ?? ""),
new XAttribute("ElementCategory", blueprintEntry.Blueprint.ElementCategory ?? ""),
new XAttribute("BaseExportableData", blueprintEntry.BaseElement.ExportableData.Serialize()),
new XElement("BaseElementState", new XCData(blueprintEntry.Blueprint.BaseElementState))));
}
}
}
}
}

View File

@@ -7,7 +7,6 @@ using Orchard.Logging;
using Orchard.Recipes.Models;
using Orchard.Recipes.Services;
using Orchard.Layouts.Services;
using Orchard.Layouts.Framework.Elements;
using Orchard.Layouts.Helpers;
using Orchard.ContentManagement;
using Orchard.Layouts.Framework.Drivers;