Check for empty grid field.

Writing a conditional to check for an uploaded image in a grid where "images" is the grid name and "supporting_thumbnail" is the second field in the grid. If evaluates to false, show a default graphic:

{{ images }}
     {{ if supporting_thumbnail|empty }}
          [example link]<img src="/assets/img/news/logo-thumb.png" alt="{{ title }}">
     {{ else }}
          [example link]<img src="{{ supporting_thumbnail }}" alt="{{ title }}">
     {{ endif }}
{{ /images }}

Seems simple enough but doesn't seem to work at all. Little help?


Answered by Jason McKinney!
>>>>>>> Answered <<<<<<<
5 Replies