mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
- Dynamic field metadata import/export and part definition storage/alteration.
--HG-- branch : dev
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.IO;
|
||||
using System.Web.Mvc;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
@@ -59,6 +55,11 @@ namespace Orchard.DevTools.Controllers {
|
||||
var typeName = XmlConvert.DecodeName(element.Name.LocalName);
|
||||
_contentDefinitionManager.AlterTypeDefinition(typeName, alteration => _contentDefinitionReader.Merge(typeElement, alteration));
|
||||
}
|
||||
foreach (var element in root.Elements("Parts").Elements()) {
|
||||
var partElement = element;
|
||||
var partName = XmlConvert.DecodeName(element.Name.LocalName);
|
||||
_contentDefinitionManager.AlterPartDefinition(partName, alteration => _contentDefinitionReader.Merge(partElement, alteration));
|
||||
}
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user