protected override void Exporting(WidgetPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Title", part.Title); context.Element(part.PartDefinition.Name).SetAttributeValue("Position", part.Position); context.Element(part.PartDefinition.Name).SetAttributeValue("Zone", part.Zone); context.Element(part.PartDefinition.Name).SetAttributeValue("RenderTitle", part.RenderTitle); context.Element(part.PartDefinition.Name).SetAttributeValue("Name", part.Name); }
protected override void Exporting(MediaPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("MimeType", part.MimeType); context.Element(part.PartDefinition.Name).SetAttributeValue("Caption", part.Caption); context.Element(part.PartDefinition.Name).SetAttributeValue("AlternateText", part.AlternateText); context.Element(part.PartDefinition.Name).SetAttributeValue("FolderPath", part.FolderPath); context.Element(part.PartDefinition.Name).SetAttributeValue("FileName", part.FileName); }
protected override void Exporting(CommentPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Author", part.Record.Author); context.Element(part.PartDefinition.Name).SetAttributeValue("SiteName", part.Record.SiteName); context.Element(part.PartDefinition.Name).SetAttributeValue("UserName", part.Record.UserName); context.Element(part.PartDefinition.Name).SetAttributeValue("Email", part.Record.Email); context.Element(part.PartDefinition.Name).SetAttributeValue("Status", part.Record.Status.ToString()); if (part.Record.CommentDateUtc != null) { context.Element(part.PartDefinition.Name) .SetAttributeValue("CommentDateUtc", XmlConvert.ToString(part.Record.CommentDateUtc.Value, XmlDateTimeSerializationMode.Utc)); } context.Element(part.PartDefinition.Name).SetAttributeValue("CommentText", part.Record.CommentText); var commentedOn = _contentManager.Get(part.Record.CommentedOn); if (commentedOn != null) { var commentedOnIdentity = _contentManager.GetItemMetadata(commentedOn).Identity; context.Element(part.PartDefinition.Name).SetAttributeValue("CommentedOn", commentedOnIdentity.ToString()); } var commentedOnContainer = _contentManager.Get(part.Record.CommentedOnContainer); if (commentedOnContainer != null) { var commentedOnContainerIdentity = _contentManager.GetItemMetadata(commentedOnContainer).Identity; context.Element(part.PartDefinition.Name).SetAttributeValue("CommentedOnContainer", commentedOnContainerIdentity.ToString()); } }
protected override void Exporting(LocalizationPart part, ContentManagement.Handlers.ExportContentContext context) { if (part.MasterContentItem != null) { var masterContentItemIdentity = _contentManager.GetItemMetadata(part.MasterContentItem).Identity; context.Element(part.PartDefinition.Name).SetAttributeValue("MasterContentItem", masterContentItemIdentity.ToString()); } if (part.Culture != null) { context.Element(part.PartDefinition.Name).SetAttributeValue("Culture", part.Culture.Culture); } }
protected override void Exporting(UserPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Email", part.Email); context.Element(part.PartDefinition.Name).SetAttributeValue("EmailChallengeToken", part.EmailChallengeToken); context.Element(part.PartDefinition.Name).SetAttributeValue("EmailStatus", part.EmailStatus); context.Element(part.PartDefinition.Name).SetAttributeValue("HashAlgorithm", part.HashAlgorithm); context.Element(part.PartDefinition.Name).SetAttributeValue("NormalizedUserName", part.NormalizedUserName); context.Element(part.PartDefinition.Name).SetAttributeValue("Password", part.Password); context.Element(part.PartDefinition.Name).SetAttributeValue("PasswordFormat", part.PasswordFormat); context.Element(part.PartDefinition.Name).SetAttributeValue("PasswordSalt", part.PasswordSalt); context.Element(part.PartDefinition.Name).SetAttributeValue("RegistrationStatus", part.RegistrationStatus); context.Element(part.PartDefinition.Name).SetAttributeValue("UserName", part.UserName); }
protected override void Exporting(MenuPart part, ContentManagement.Handlers.ExportContentContext context) { // is it on a menu ? if (part.Menu == null) { return; } var menu = _orchardServices.ContentManager.Get(part.Menu.Id); var menuIdentity = _orchardServices.ContentManager.GetItemMetadata(menu).Identity; context.Element(part.PartDefinition.Name).SetAttributeValue("Menu", menuIdentity); context.Element(part.PartDefinition.Name).SetAttributeValue("MenuText", part.MenuText); context.Element(part.PartDefinition.Name).SetAttributeValue("MenuPosition", part.MenuPosition); }
protected override void Exporting(OEmbedPart part, ContentManagement.Handlers.ExportContentContext context) { var partName = XmlConvert.EncodeName(typeof(OEmbedPart).Name); var infosetPart = part.As <InfosetPart>(); if (infosetPart != null) { // OEmbedPart is not versionable thats why using Infoset.Element instead of VersionInfoset.Element var element = infosetPart.Infoset.Element; var partElement = element.Element(partName); if (partElement == null) { return; } context.Element(partName).Add(partElement.Elements()); } }
protected override void Exporting(BlogPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Description", part.Description); context.Element(part.PartDefinition.Name).SetAttributeValue("PostCount", part.PostCount); context.Element(part.PartDefinition.Name).SetAttributeValue("FeedProxyUrl", part.FeedProxyUrl); }
protected override void Exporting(SiteSettingsPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("SupportedCultures", string.Join(";", _cultureManager.ListCultures())); }
protected override void Exporting(AudioPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Length", part.Length); }
protected override void Exporting(IdentityPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Identifier", part.Identifier); }
protected override void Exporting(OEmbedPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Source", part.Source); }
protected override void Exporting(AdminMenuPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("AdminMenuText", part.AdminMenuText); context.Element(part.PartDefinition.Name).SetAttributeValue("AdminMenuPosition", part.AdminMenuPosition); context.Element(part.PartDefinition.Name).SetAttributeValue("OnAdminMenu", part.OnAdminMenu); }
protected override void Exporting(AutoroutePart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Alias", String.IsNullOrEmpty(part.Record.DisplayAlias) ? "/" : part.Record.DisplayAlias); context.Element(part.PartDefinition.Name).SetAttributeValue("CustomPattern", part.Record.CustomPattern); context.Element(part.PartDefinition.Name).SetAttributeValue("UseCustomPattern", part.Record.UseCustomPattern); }
protected override void Exporting(ImagePart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Height", part.Height); context.Element(part.PartDefinition.Name).SetAttributeValue("Width", part.Width); }
protected override void Exporting(CommentsPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("CommentsShown", part.CommentsShown); context.Element(part.PartDefinition.Name).SetAttributeValue("CommentsActive", part.CommentsActive); context.Element(part.PartDefinition.Name).SetAttributeValue("ThreadedComments", part.ThreadedComments); }
protected override void Exporting(MenuItemPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Url", part.Url); }
protected override void Exporting(UserRolesPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Roles", string.Join(",", part.Roles)); }
protected override void Exporting(BodyPart part, ContentManagement.Handlers.ExportContentContext context) { context.Element(part.PartDefinition.Name).SetAttributeValue("Text", part.Text); }