I cant figure out how to test for the presence of a variable in an yaml meta file.
For example:
imageName.jpg is in the same folder as its meta file imageName.jpg.meta.yaml
The contents of imageName.jpg.meta.yaml are:
title: Image Name
media: acrylic
surface: canvas 36 x 36 inches
style: geometric abstract
portfolio: true
thumbnail: false
I can of course access those variables easily like this <div>{{ image.meta.media }}</div>
but if media is not defined in the meta.yaml file, I expected something like this to work (usually using in a for loop):
{% if image.meta.media %}
{{ image.meta.media }}{% endif %}
But that doesn’t work, it always thinks image.meta.media exists in the meta.yaml file, and when it isn’t defined the output in that
As always, any help is much appreciated.