This project is read-only.

Multi value field or parts

Topics: Core, General
Aug 22, 2012 at 9:54 PM

I have a specific question about fields and parts. I come from the Drupal world where it is possible when creating a content type to mark a field as mutlivalued. Then, when creating a page of this content type, the field show up with a + button next to it and you can add line to the field. I was wondering how I could do the same thing under Orchard.

I think using the container / containable relationship would not fit exactly what I'm aiming for, as the content I'm looking to add to the page is specific to the page and shouldn't be accessible on its own.

Aug 23, 2012 at 6:05 AM

That would be a neat feature.  Building your own fields capable of doing this is certainly possible.  You can see how all the core fields are built in the module Orchard.Fields.  

Aug 23, 2012 at 2:09 PM

Actually I'd be more inclined into adding this capacity to parts made using the admin interface. A part represent a complex set of data, which an array is.

However, we're still in evaluation phase of Orchard to see if it fits is for the next version of our website, and I have yet to dive deep down into the code. I've checked into Orchard.ContentType, but I still don't understand the relationship between a content creation/edition and the parts that compose its content type.

Aug 23, 2012 at 6:50 PM

Well if you hit any snags or have a specific question, I'd be glad to try and help clear things up.  

Aug 27, 2012 at 7:25 AM

The content picker field supports multiple values. It would be neat for other field types to be able to do the same but we don't have that feature yet. Please feel free to file a bug.