I'm trying to get this script NOT to display anything IF there is no image. Here's the script:
<?php $i=0; foreach ($_categories as $_category):
if (!$_category->getIsActive()): continue; endif;
$cur_category = Mage::getModel('catalog/category')->load($_category->getId());
$imageUrl = $cur_category->getImageUrl();
if (empty($imageUrl)): $imageUrl = Mage::getBaseUrl('media').'catalog/category/np_thumb2.gif'; endif;
?>
Right now unless there is an image it will display a no-image image. I've been trying many things but everything I tried so far ends up giving a broken link. I'm sure it's easy, kinda like brain surgery, easy if you know how. All you need is a putty knife.
Thanks