Just a thought experiment on my part, but thinking if you work with a copy of includes/templates/template_default/common/tpl_header.php or more specifically includes/templates/YOUR_TEMPLATE/common/tpl_header.php then if you find this section:
Code:
<!--bof-branding display-->
<div id="logoWrapper">
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
<div id="taglineWrapper">
<?php
You could modify it to do some sort of lookup (new function?) to identify your desired image, or you could use a "crafted" version of the logo filename so that if the filename exists to use your file and if not then the default:
Code:
<!--bof-branding display-->
<div id="logoWrapper">
<div id="logo"><?php
if (file_exists($template->get_template_dir('logo-' . $current_category_id . '.' . pathinfo(HEADER_LOGO_IMAGE, PATHINFO_EXTENSION), DIR_WS_TEMPLATE, $current_page_base,'images') . '/' . 'logo-' . $current_category_id . '.' . pathinfo(HEADER_LOGO_IMAGE, PATHINFO_EXTENSION))) {
$current_logo = $template->get_template_dir('logo-' . $current_category_id . '.' . pathinfo(HEADER_LOGO_IMAGE, PATHINFO_EXTENSION), DIR_WS_TEMPLATE, $current_page_base,'images') . '/' . 'logo-' . $current_category_id . '.' . pathinfo(HEADER_LOGO_IMAGE, PATHINFO_EXTENSION);
} else {
$current_logo = $template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE;
}
echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($current_logo, HEADER_ALT_TEXT) . '</a>'; ?></div>
<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
<div id="taglineWrapper">
<?php
Probably a lot of other ways to accomplish it and didn't look for a ZC related function to obtain the file extension, but the above should allow filenaming to be similar to the original logo (meaning same file extension) but with a relatively straight forward filename convention of 'logo-$current_category_id', or the standard header logo if the previous don't exist. The logo is expected to be saved in the template directory images folder as allowed through applicable overrides identified in includes/classes/template_func.php.
Bookmarks