This project is read-only.

Collection of ContentItems

Topics: Customizing Orchard, Writing modules
Dec 16, 2011 at 4:08 AM
Edited Dec 16, 2011 at 4:08 AM

Is there a good example somewhere that depicts how to have a ContentItem that has a collection of ContentItems?


Dec 16, 2011 at 4:46 AM

I think I found what I need in Orchard.Comments.

If anyone finds more examples please let me know.


Dec 16, 2011 at 3:06 PM

The more obvious example is the Container/Containable parts in core. Also the upcoming Projector module, and my own Mechanics module.

Dec 16, 2011 at 3:24 PM

Thanks!  I had a feeling you would chime in with Mechanics so I started looking there this morning.  Good stuff! 

If I can't figure it out from that I don't beed to be developing anymore!

Dec 16, 2011 at 3:32 PM

It depends on scenario which approach you want to take. Containers are pretty straightforward but allow only 1-n relationships. Projector covers a lot of scenarios. Anything more complex, Mechanics can handle - but it's the most work to understand and use properly! If you're looking at the Gallery version it has a lot of problems, I'm working on a new-and-improved version which should have been ready by now but we're hitting Christmas which always makes progress harder...