Strategy for One to Many relationships?[email protected] Member
edited November 2017 in Content Strategy

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.

Thank you

Best Answer


  • Actually, after some digging in the sample project. I see that the About Us and Facts seem to follow what I want to accomplish. When I try to edit the About us page to assign a new fact, I can seem to assign new facts to the box in the about us page. And I can't see any other way to tag the fact to get them to show up in the box.

    Can anyone on the cloud team provide some insight?

    @JanaPelclova @MartinDanko @PetrSvihlik

  • Thank you for the reply @JanLenoch. After working through some new content types, I see that modular content is exactly what I need. For some reason, I do not see the Assign button in the About us page in the Sample App. Now that I've built my own templates I do see that you can multi-select the modular content. Thank you

Sign In or Register to comment.