Import handler for BodyPart.

--HG--
branch : dev
This commit is contained in:
Suha Can
2011-03-15 19:16:48 -07:00
parent 76af635ea8
commit 008d64e381

View File

@@ -58,6 +58,13 @@ namespace Orchard.Core.Common.Drivers {
() => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix));
}
protected override void Importing(BodyPart part, ContentManagement.Handlers.ImportContentContext context) {
var element = context.Element(part.PartDefinition.Name);
if (element != null) {
part.Text = element.Attribute("Text").Value;
}
}
protected override void Exporting(BodyPart part, ContentManagement.Handlers.ExportContentContext context) {
context.Element(part.PartDefinition.Name).SetAttributeValue("Text", part.Text);
}