List of ContentItem in ContentPart

Topics: Customizing Orchard, Writing modules
Aug 2, 2011 at 10:48 AM



I want to create a content part which will be able to contain a list of content items. What I want to achieve is that for every content part I instantiate, I can add or remove content fields and have different number of content fields and content field types / content part instance. How should I do this ? It works to have in my part a List<ContentField> ? What aproach would be better for this ?

Thank you !

Aug 2, 2011 at 9:48 PM

You could use this module: or you can implement your own relationships using methods described in

Aug 5, 2011 at 1:01 PM

Thank you for answer ! Regarding Mechanics Module, I didn't really figured out how to effectively use it. I would like to write this by my own, this being my first part written in orchard and I can learn. I perfectly understand the relationships implemented in the tutorial but I need to create relations between a part and a variable list of content fields. I added a List<ContentField> in my record. Now, the problem is that I don't know what to store in the database for this list. How my migrations class should look like ?