I have been working on building themes with better, more detailed product pages. This means product-specific imagery.
I can create a metaobject with a list of images, but I cannot access that list from the theme editor. There is no image_list input type in the theme editor.
The only way to create a list of images is to nest a second metaobject layer and and create slots for:
image_1
image_2
image_3
image_4
.. and so on.
Hey again @Gideon. This isn’t currently supported through the theme editor. RIght now, there’s no image_list setting type, and image_picker dynamic sources support a single file_reference, but not list.file_reference.
You should still be able to access and iterate over the image list directly in Liquid though, without creating separate Photo 1, Photo 2, etc. fields. For example, if your product metafield references the metaobject:
You’d just need to replace the namespace, key, and field handle with your own.
I get why this wouldn’t be super intuitive for a merchant though, so I’m happy to file a feature request for this on your behalf. Let me know if the workaround works on your end or if I can clarify anything further.
Hey @Alan_G this is for a theme store context, so named keys are not ideal. I do have a pattern for named keys where the merchant sets a key name in global settings. I don’t love the UX, so I try to do it as little as possible.
From a merchant UX standpoint nested metaobjects is strictly better than named keys on global settings. I have already adopted the nested metaobject approach and built on top of that approach.
Nested metaobjects work, but having an image_list setting would be better. Especially for something like a “gallery” block to allow 1..n images.
I’m mostly posting this because dot-dev is next week and I want to have conversations about this (and the other threads) in person, and follow up here if there’s anything to follow up about.