Magento: customized category banner block

http://www.panticz.de/sites/default/files/magento/categorybanner/local.xml

<?xml version="1.0" encoding="UTF-8"?>


    
    
        
            
            
        
    


1

http://www.panticz.de/sites/default/files/magento/categorybanner/banner.phtml

<?php
$banner = array(
    // root category
    "shop.html"
        => array("lcd.jpg", "http://www.example.com/shop/tv/lcd.html"),

    // tv
    "http://www.example.com/shop/tv/lcd.html"
        => array("led.jpg", "http://www.example.com/shop/tv/led.html"),
    "http://www.example.com/shop/tv/plasma.html"
        => array("hdtv.jpg", "/hdtv")
)
?>
1

http://www.panticz.de/sites/default/files/magento/categorybanner/my.banner.phtml

<?php
/*
* banner
* ./app/design/frontend/default/default/template/catalog/layer/my.banner.phtml
*
* v2011-02-08
*/
?>

<?php
include("banner.phtml");

$url = Mage::registry('current_category')->getUrlPath();

//$url = str_replace("shop/", "", $url);
//$url = str_replace(".html", "", $url);

$url = "http://www.EXAMPLE.COM/" . $url;

// view banner if available
if(array_key_exists($url, $banner)): ?>

<?php else: ?>
<?php endif; ?> 1