ContentItem and ContentPart

Topics: General, Writing modules
Jul 13, 2011 at 10:31 PM
Edited Jul 13, 2011 at 10:34 PM

I am reading through http://orchardproject.net/docs/Creating-1-n-and-n-n-relations.ashx and I have a couple of questions.

How would you make State turn up in the List of Content Types in the admin?

Would it need a handler and a proxy class?

What code exists because the Address is a Part and not a Content Item?

Coordinator
Jul 13, 2011 at 10:55 PM

I'm sorry, but I don't understand the questions. Can you be a little more specific about what you are trying to achieve?

Jul 13, 2011 at 11:25 PM
Edited Jul 13, 2011 at 11:26 PM

I would like to create an appointment that participates on the 1 end of some relationships like taxonomy and users but participate on the N end of other relationships like a task.

Appointment has a User (owner)

Appointment has an AppointmentType (Taxonomy Term)

Task has an appointment (optional)

I am getting confused about whether I have to create an AppointmentPart class and AppointmentPartRecord class or an AppointmentRecord class only.

Coordinator
Jul 13, 2011 at 11:33 PM

Apointment is a content type apparently, so yes you''ll need a part and a record, not just a record.

Jul 13, 2011 at 11:54 PM

Ok, thankyou for the direction. I am going to create an "AppointmentPart : ContentPart<AppointmentPartRecord>" class and an "AppointmentPartRecord : ContentPartRecord" class.

Regarding the Migration, Content Types do not need the builder.Attachable, right?

Coordinator
Jul 13, 2011 at 11:59 PM

mmh, it's parts that are attachable, but the Appointment part would probably not need it if it's going to be specific to that type, no, if that's what you're asking.

Jul 14, 2011 at 12:03 AM

It is what I am asking, so ta