This project is read-only.

Draftable 1-N part examples?

Topics: Writing modules
Jul 16, 2012 at 5:52 PM
Edited Jul 16, 2012 at 6:07 PM

I want to create a module with a part, similar to tags, except I want to ensure my records are versioned along with the associated content item. Are there any examples out there of versioning this kind of type relationship?

What I have so far is a Part Record that derives from ContentPartVersionRecord, and a child table that maintains a collection of entities associated with each part. How should I structure this relationship so it is version managed? My first thought is to hook into handler lifecycle events OnVersioned etc of the part and copy the latest associated records.


Jul 16, 2012 at 11:30 PM

Did you look at existing parts (tags, etc.)?

Jul 17, 2012 at 12:25 AM

Tags are not draftable. I verified this by adding tags to a draft page in orchard without publishing, and they showed up. There don't seem to be any draftable 1-N parts

Jul 17, 2012 at 12:50 AM

I'm afraid you're breaking new ground then...