I am using the theme Dawn 10.0 and in each product page, I would like to add some images specifically for each product in the template using metafield.
The way I used was to create a Collage section in the template and using metafield so that different image can be shown for different products.
It works, but for products which do not have such images, the default placeholder image will be shown. How I can avoid this or hide the placeholder image? Creating 2 templates (1 has the Collage and 1 doesnt) for products is the last thing I want to do as we have to manually select the template for products every time if we have new images to be uploaded.
Or do you have a better method to show different images not in the media part and not in the description part? Thank you.
Hello @Woody_JEKCA ,
The method you use is perfect to show different images for each product.
You have to just make the section conditional so if there is no image then the placeholder will remain hidden.
If you are a dynamic source to add images then try to create a logic with JS to ide the placeholder images.
Thanks
Hi, thank you for your reply. How can I make the section conditional?
Edit the section find the code and use it.
https://shopify.github.io/liquid/tags/control-flow/
If you are using dynamic source to call the metafield images then you need to write script a/t the html structure.
Hi Guleria,
Thank you. Now I know that I have to write a code in the Custom CSS part, but what should I write? Thank you.
No, you have to write JS script or liquid code a/to the flow of the theme.
So I guess if I am not familiar not the script/code, I am not able to do it on myself?