I have the following code that displays my category banner image:
<?php $_helper = $this->helper('catalog/output'); $_category = Mage::registry('current_category'); $_imgHtml = ''; if ($_imgUrl = $_category->getImageUrl()) { $_imgHtml = '<p class="category-image"><img src="'.$_imgUrl.'" alt="'.$this->escapeHtml($_category->getName()).'" title="'.$this->escapeHtml($_category->getName()).'" /></p>'; $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image'); } ?> <?php if($_imgUrl): ?> <?php echo $_imgHtml ?> <?php endif; ?>
I'd like to adapt the code, so that if no category banner exists an alternative banner is displayed. The alternative banner is stored in a static block called 'alternative_cat_banner'.
Can anyone suggest an edit to the code above to achieve this please?