What I wanted to do:
Have 2 categories, each category would have a different HEADER LOGO & STYLESHEET as well as image buttons for SIDEBOXES
this is just to help my situation but I thought that I would post it incase it helped anyone else. There is probably a bettera nd cleaner way of doing this BUT I do only change template files using eth override system so it "shouldn't" effect new core code.
As always back up and test. I have this working but can only post url after the site is live.
You might not need to do as much as me as I used images rather than CSS so it could be even simpler than below
Files I edited (use the template override system always):
your_template/common/html_header.php
your_template/common/tpl_header.php
your_template/common/tpl_footer.php
your_template/common/tpl_default_box_left.php
your_template/css/stylesheet.css
new files
your_template/css/split/stylesheet_flame.css
your_template/css/split/stylesheet_esd.css
Note my file variables are called “esd” and “flame” just replace these with your own suitable words throughout
For CSS and general variables
FILE: html_header.php
find line at top
include the next lines belowCode:/*** load the module for generating page meta-tags*/ require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php'));
You will need to expand the switch for the different categories that you want this to work with – just click on the categories themselves and take a note of the cPath value in the URL bar. Don’t forget to set a default value for the cart etcCode:/*** which category are we in - flame or ESD determine from this which variable to display */ $cpath = $_GET['cPath']; $cpath = explode("_", $cpath); switch ($cpath[0]) { case "11": $variablecpth = "esd"; break; case "3": $variablecpth = "flame"; break; default: $variablecpth = "flame"; break; }
In Same file locate
and add in above itCode:/** * load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by JuxiJoza. */
For the changing header logoCode:/** * load the spilt css for flame and esd SARAH 21 Aug 2006 */ echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"includes/templates/classic/css/split/stylesheet_".$variablecpth.".css\" />\n";
This is header because the header logo name is set in the language files – so open
FILE: tpl_header.php
and locate
now replace with these linesCode:<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>
CSS filesCode:<!--allowing different header images to display--> <!-- <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>--> <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . '<img src="includes/templates/classic/images/header_'.$variablecpth.'.jpg" alt="'.$HEADER_ALT_TEXT.'" title="'.$HEADER_ALT_TEXT.'" width="779" height="112" />' . '</a>'; ?></div>
Create a new CSS folder called “split” under the folder your-template/css/
In there place the css files that details ONLY the items that will change in colour – everything else keep in css/stylesheet.css, call these css/split/stylesheet_flame.css and css/split/stylesheet_esd.css
Swapping Images
Now I use image for nav buttons a lot so I have to edit ANY location that uses an image and include this:
then I name each image identically except for the “flame” or “esd” item, these are all saved in the same folder your_template/images/Code:<img src="includes/templates/classic/images/home_<?=$variablecpth?>.jpg" alt=”" title=" " height="16" />
this I change the files within
FILE: tpl_footer.php
FILE: tpl_header.php
But this might not apply to you and you can do most things via CSS
Categories side box headers
FILE: common/tpl_default_box_left.php
Again I like using images for this and so I had to add the home_<?=$variablecpth?>.jpg
Within common/tpl_default_box_left.php for example:
Basically it’s a little unorthodox and not the best but it does allow you to have different looks for different categories – your SSL will work – no need to play around with the dB or anything else.Code:<h3 class="leftBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><img src="includes/templates/classic/images/<?php echo $title; ?>_<?=$variablecpth?>.jpg" alt="<?php echo $title; ?>" title="<?php echo $title; ?>" width="171" height="33" /></h3>
I will try to answer questions if you have any
Enjoy
Sarah



