Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Remove Sideboxes from home page

Remove Sideboxes from home page

Locked

Views: 7,496

Results 21 to 21 of 21
This thread is locked. New replies are disabled.
8 Apr 2008, 7:19 AM
#21
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Remove Sideboxes from home page

To switch logo images (foreground), you would use the alternate code. The logo has some fancy access coding associated with it, so it may take a bit of fiddling to get exactly the right modification.

If you only want the different header for home and shopping cart pages, the code can be drastically simplified. This also assumes we discard the verification and trust that the image file exists.

In the "branding display" section of tpl_header.php, replace this line```php

<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> ```with this
<!--Smart Backgrounds-->
<?php $smart_image = ''; 
if ($this_is_home_page or $current_page_base == 'shopping cart') { 
  $smart_image = logo1.gif;//for home & cart
} else { 
  $smart_image = logo2.gif);//for everything else
}?>
<!--/Smart Backgrounds-->
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir($smart_image, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . $smart_image, HEADER_ALT_TEXT) . '</a>'; ?></div>

Name and save images in /includes/templates/your_template/images/ as logo1.gif and logo2.gif.
For foreground images, you do not need to make individual stylesheet declarations.