Importing/Identity

Topics: Writing modules
Jul 16, 2012 at 4:12 PM
Edited Jul 16, 2012 at 4:17 PM

protected override void Importing(FeaturedArticlesPart part, ImportContentContext context)
{
var count = context.Attribute(part.PartDefinition.Name, "Count");
 if (count != null)
 {
 part.Count = Convert.ToInt32(count);
 }
}
 ContentDefinitionManager.AlterTypeDefinition("FeaturedArticles",
                cfg => cfg
                    .WithPart("FeaturedArticlesPart")
                    .WithPart("CommonPart")
                    .WithPart("WidgetPart")
                    .WithPart("IdentityPart")
                    .WithSetting("Stereotype", "Widget")
                );

After an hour of trying to get some xml files loaded for my widget, i figured what i was missing but my question is why it worked? I couldn't get the widget inserted unless I added the IdentityPart...

Jul 16, 2012 at 9:00 PM

http://stackoverflow.com/questions/7389747/what-is-identitypart-in-orchard-cms-good-for

found something...