Repeatable content part.

Topics: Administration, Customizing Orchard, General
Mar 7, 2014 at 2:55 PM
Does anyone know a module to repeat content part in Orchard content type?
For a more detailed description and for example in Wordpress I'm using repeater feature for this.
I created a newspaper content type in Orchard. Newspaper pages count is not a significant number but the field is always unchanged. For example I create a newspaperPage content part with a pageNumber (numeric field), pageFileUrl (link field), ... now I want to add multiple (The number is not fixed) newspaperPage content part in newspaper content type. Please guide me. Excuse me for my bad English.
Mar 7, 2014 at 3:01 PM
I am not sure if it fits your needs, I don't know much about wordpress either, but take a look at Container and Containable parts.


Mar 7, 2014 at 6:52 PM
Edited Mar 7, 2014 at 7:03 PM
Oh my god...
It's very simple in Orchard. It doesn't require any plug-ins for doing this.

Simple Solution:
  1. Define repeatable part as a new content type (e.g. newspaperPage).
  2. Then add above new content type (e.g. newspaperPage) to previous content type (e.g. newspaper) as a new field with ContentPickerField type and check Allow multiple content items option.
  3. Save and Enjoy :D
Mar 17, 2014 at 6:07 AM
Edited Mar 17, 2014 at 6:07 AM
cyclops24 wrote:
Simple Solution:
  1. Define repeatable part as a new content type (e.g. newspaperPage).
  2. Then add above new content type (e.g. newspaperPage) to previous content type (e.g. newspaper) as a new field with ContentPickerField type and check Allow multiple content items option.
  3. Save and Enjoy :D
I've used this method but display some data is being complex. For example I am confronted with the following problem:
Accessing a contentpicker field value
Does anyone know a better way for handle repeatable content part in Orchard?