Category Blog - Layout if the intro image is set

by LeilaH   Last Updated June 17, 2018 08:10 AM

I would like to add a tag around the intro text, but only if the article has an intro image.

It's easy to add markup around the image in the intro_image layout file. And in the file blog_item.php, I can see where the text is included:

<?php echo $this->item->introtext; ?>

But can anyone help me write an if statement so that I can add a <div> around the text so that I can control the layout if the intro image has been set?

Related Questions

Hide tags in category blog layout

Updated December 16, 2016 08:04 AM

Get Category intro image in the index.php

Updated September 08, 2016 08:06 AM