mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-27 12:29:04 +08:00
Minor blueprints cleanup.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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))));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user