Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
Hi. I have a metaobject which provides five file inputs (Images). This metaobject is a metafield of a product. Overview:
Product
Product Metafield
Metaobject
Metafield 1: Image
Metafield 2: Image
Metafield 3: Image
Metafield 4: Image
Metafield 5: Image
Names
Product Metafield (that hosts the metaobject) product.metafields.custom.old_images
Metaobject: old_images_linking
Image 1 - 5 metafields within metaobject: image_1, image_2 aso.
I want to write a custom liquid code on the product default template in the shopify theme editor. Within this custom css I want to have an if function, that hides #shopify-element-xxx if the metafield image_1 of the metaobject that this product is connected to is empty.
I know how to write the code. But I need help understanding how I specifically target this field.
So far I have tried
{% if product.metafields.custom.old_images.old_images_linking.image_1 == blank %} etc...
But this is not working.
Anyone help? Thank you !