Link Content Parts in a 1:m Relationship

Topics: Customizing Orchard
Apr 10, 2012 at 9:00 PM

I have two custom lists that I'd like to link together. I've searched the web, but have come up empty (besides this response at SO: http://stackoverflow.com/questions/10003513/linking-lists-in-orchard-cms). Is there an easy way to link between multiple content parts? For instance, I may have a list of departements and a list of employees. There can be many employees within one department. Taking this a step futher, I'd like to be able to say that those employees also belong to another content part called committee. So, the same employees can be part of multiple content parts and filtered like a list.

I tried to add the container and containable part to the department content part, but it doesn't allow me to filter or choose items.

Like always, I'm probably overlooking something.

Apr 10, 2012 at 9:58 PM

What happened when you tried to follow the suggestions from that SO question? Did you look at the ScienceProject module?

Coordinator
Apr 11, 2012 at 7:54 PM

And what about following the docs or using the science project? http://docs.orchardproject.net/Documentation/Creating-1-n-and-n-n-relations

Apr 11, 2012 at 8:18 PM
Edited Apr 11, 2012 at 8:25 PM

This actually isn't for me. This is for someone else who's using Orchard. In this case, the individual doesn't have an application development background. I had explained that a custom module can be created, but they were looking for something built in.

I also believe they already have content built up using the built in content parts (nearly 200 content items) so getting them to change that over to the ScienceProject module might be a bit tough. I forgot about that though. Thanks for the reminder.

Coordinator
Apr 12, 2012 at 12:31 AM

The science project then? Or... re-reading your description of the problem, this might be a job for taxonomies. Department and committee look very much like taxonomies.

Apr 12, 2012 at 4:34 AM

I was thinking that as well. I'm not sure though. I'm going to mock up some things locally and see if I can get it to work.

Thanks for the tips.