Support

Account

Home Forums Add-ons Repeater Field FOR EACH Inside of an IF/ELSE using Select Field/Repeater Reply To: FOR EACH Inside of an IF/ELSE using Select Field/Repeater

  • I’m not sure that I completely understand what $block['testimonial_image'] is expected to hold at this point. If it is an image field that is returning an array it could hold an empty array, the value false or an empty string it no image is entered. Instead of checking to see if it !== exactly equal an empty string try empty

    
    <?php if (!empty($block['testimonial_image'])) : ?>
      <div class="testimonial-image"><img src="<?=$block['testimonial_image']['sizes']['image-90-90']?>"/></div>
    <?php endif; ?>