You do want category bg function as well as main pages and specific ez-pages, so it will take a combination of the if tests posted here.
PHP Code:
<!--Smart Backgrounds-->
<?php $smart_image = '';
if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and top cat id to bg filename only if cat bg image exists
$smart_image = (file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . str_replace(strstr($_GET[cPath],'_'),'',$_GET[cPath]) . '.gif'))?'_' . str_replace(strstr($_GET[cPath],'_'),'',$_GET[cPath]):'';
} elseif (in_array($current_page_base,explode(",",'contact_us')) or ($current_page_base == 'page' and ($_GET['id'] == 5))) {
$smart_image = '_badge';
}?>
<!--/Smart Backgrounds-->
<div id="mainWrapper" class="smartBG<?php echo $smart_image;?>">
The explode is not necessary for a single page name, but will be useful if you want more. Likewise, if you want more ez-pages, you can duplicate the $_GET['id'] == 5 like
($_GET['id'] == 5 or $_GET['id'] == 8)
You will need smartbg_1.gif image files for each category desired, and one smartbg_badge.gif for the rest.
Bookmarks