Strategy for One to Many relationships?
We are building a cloud site for one of our clients to validate that cloud can actually work for a few of our use cases. I have already hit a bump that I am curious to see how others have handled this.
Requirement: The end client is non-technical, and a good candidate for a simple tool like draft. Any solution to manage the content must be easy to implement for a non-technical users.
I am trying to determine the best strategy for managing a one-to-many relationship within Draft. Both items are custom content types. To simplify things for explanation, the objects are called ParentItem and GalleryImages. The Parent Item will be bound to listings and have an item details page where an ImageGallery will be shown.
The GalleryImage type will include the file, alt text, caption, and possibly other data.
With the current state of the Content Inventory and content type editors, I don't think I can easily
The number of parent items will be dynamic. Tagging each image with a sitemap location or taxonomy item would mean that every time a new ParentItem is added, either the sitemap or taxonomy item would have to be created. That doesn't seem reasonable, or the best use of either of those components.
Modular content looked like it could work, but I have to create a field that allows for content selection and content types don't allow for a variable number of items. I would have to end up creating a bucket of fields, such as Image1, Image2...ImageX that represent the max number of items they can add, most of them may be empty.
I could also add a ParentItemKey to both the ParentItem and each Gallery Image to allow for an easy API lookup. That approach may make it a bit harder for the client to manage as the number of images grow. It also looks like the key should be a part of the GaleryImage name field so that the search would help filter out images for a specific ParentItem in the Content Library.
Am I missing anything? Is there a built in way that will let me do this? Has anyone else solved it in a different matter?
This is an MVC 5 site, but the back end shouldn't make a difference on this topic.