Adding a Field in migrations

Topics: Writing modules
Developer
Sep 26, 2011 at 5:49 PM

Hi All,

I was wondering if there is a way to add a Field.. i.e. a TextField within Migrations? Also how would I access said field i.e. part.As<TextField> ??

Cheers, Nick

Coordinator
Sep 26, 2011 at 6:02 PM

Yes, there are some examples in orchardgallery.codeplex.com, using Taxonomy. And to access the field, its ContentItem.PARTNAME.FIELDNAME, as long as ContentItem is of type 'dynamic'

Developer
Oct 4, 2011 at 7:03 PM

Thanks Seb. Got it working :)