Hi,
I know there’s a simple answer somewhere but it’s eluding me. On a blog-type page I have a space for a thumbnail which can be either an image or an embedded video. In the channel entry the thumbnail image is a required field (the image is used elsewhere in the blog) but the video entry is optional. The key is, if a video tag is entered in the channel entry, I want it to take the place of the image in the thumbnail spot. Otherwise I want the image to show. Here’s the code that I expected would do just that:
<div class="post_thumbnail">
{if thumbnail_video != ''}
{thumbnail_video}
{if:else}
{thumbnail_image}
{/if}
</div>This code, however, always defaults to the thumbnail image and never shows the video. Before the image was a required field (in other words, if there was just one or the other, but not both) I was able to use this code to generate the correct thumbnail:
<div class="post_thumbnail">
{if thumbnail_image}
{thumbnail_image}
{/if}
{thumbnail_video}
</div>How do I check to see if there is content in the thumbnail_video channel field and show that instead of the image?
Thanks to all in advance,
Mignonne Maxwell