Any way to utilize multiple images or files in Plasmic CMS?

Hi there! Pretty basic question (I’m more on design side than dev side).

Is there a way to utilize multiple images or files in the plasmic cms? I only see the ability to upload one file in a single field. I’m trying to build out something like a gallery of images per dynamic page.

Hi @shiny_swan , there isn’t currently this type of field built in yet to the Plasmic CMS.

In case it helps if you are in a bind, a workaround is to add another object type, call it something like ImageAttachment. Add a single image field to it, and also another field in it that references the ID or name of a specific entry of the other model type—for instance if you are trying to add images to products, reference the product ID here.

Let me know if that helps.

@modest_mouse That workaround sounds great! Do you think you could clarify a bit with some more specifics? Still wrapping my head around the platform.

Yeah definitely!

It’s just another way of designing the data model where you join two different tables of data.

Let’s say you want to in your page design display all of the images for a given product. You can

  1. Insert a CMS fetcher that shows some products.
  2. Insert a nested CMS fetcher that loads image attachments. This should be getting automatically repeated for each product in the outer fetcher.
  3. Filter the nested fetcher to just image attachments where the product ID equals the ID of the product from the outer fetcher. You do this by right clicking to set a dynamic value.
    Please let me know if that makes sense!