In my content type I want to show the main image if the thumbnail field is empty. So I use the Display Suite code field and I enter the following code:
<?php
dsm($entity);
if(empty($entity->field_thumbnail)){
print_r('Thumbnail missing');
// What code to put here to enable or render another image field
}
?>
When the tumbnail is missing the above code works, but instead of text I want to display another image field, when the thumbnail is missing. I have tried everything I can think of, but the main image dose not show :-(.