I have just finished a little mod for per-category/per-page header background images, so you are the lucky guinea pig - er - first recipient.
Description:
##########################################################################################___
Display header bg image for individual top cat, or current page base, if corresponding image exists in /includes/templates/your_template/images/.
Name images like headerbg_23.gif for cat 23 & subs, or headerbg_shippinginfo.gif for shipping & returns page.
Name default image headerbg.gif.
Add a class to your stylesheet for each image, like
Code:
#headerWrapper.headerBG_23 { background-image: url(../images/headerbg_23.gif);}
#headerWrapper.headerBG_shippinginfo { background-image: url(../images/headerbg_shippinginfo.gif);}
with any other styling you desire.
Find in /includes/templates/your_template/common/tpl_header.php
PHP Code:
<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<div id="headerWrapper">
<!--bof-navigation display-->
and replace with
PHP Code:
<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<!--per-category/per-page header bg images - gjh42 2007-12-11-->
<!--
Display header bg image for individual top cat, or current page base, if corresponding image exists in /includes/templates/your_template/images/.
Name images like headerbg_23.gif for cat 23 & subs, or headerbg_shippinginfo.gif for shipping & returns page.
Name default image headerbg.gif.
Add a class to your stylesheet for each image, like
#headerWrapper.headerBG_23 { background-image: url(../images/headerbg_23.gif);}
with any other styling you desire.
-->
<?php $alt_header_image = '';
if ($current_page_base == 'index' or 'product_info') { //add _ and top cat id to bg filename only if cat bg image exists
$alt_header_image = (file_exists(DIR_WS_TEMPLATE_IMAGES . 'headerbg_' . str_replace(strstr($_GET[cPath],'_'),'',$_GET[cPath]) . '.gif'))?'_' . str_replace(strstr($_GET[cPath],'_'),'',$_GET[cPath]):'';
} else { //add _ and page base to bg filename only if page bg image exists
$alt_header_image = (file_exists(DIR_WS_TEMPLATE_IMAGES . 'headerbg_' . $current_page_base . '.gif'))?'_' . $current_page_base:'';
}?>
<!--/per-category/per-page header bg images-->
<div id="headerWrapper" class="headerBG<?php echo $alt_header_image;?>">
<!--bof-navigation display-->
If you want to use jpg or png images, change the instances of ".gif" accordingly.
Bookmarks