Forums / Templates, Stylesheets, Page Layout / Adding an image for the header and footer of center column

Adding an image for the header and footer of center column

Locked

Started by smoke133 on 13 Jul 2008, 2:56 AM · Views: 4,565

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
13 Jul 2008, 2:56 AM
#1
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Adding an image for the header and footer of center column

How do I add an image for center column? I have one for the background. I would like to add one for the header and footer for the center column.

https://www.jhelectronics.com
Using Zencart 1.3.9h

13 Jul 2008, 3:46 AM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,895
Plugin Contributions:
21

Re: Adding an image for the header and footer of center column

There are no headers or footers for the center column. You would have to create them by adding divs and wrappers inside the centerColumn.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

13 Jul 2008, 4:47 AM
#3
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: Adding an image for the header and footer of center column

Where and how would I add that?

https://www.jhelectronics.com
Using Zencart 1.3.9h

7 Aug 2008, 1:07 PM
#4
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: Adding an image for the header and footer of center column

Do I do this all in my template css, or is there somewhere else I need to add this to?

https://www.jhelectronics.com
Using Zencart 1.3.9h

7 Aug 2008, 6:28 PM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,895
Plugin Contributions:
21

Re: Adding an image for the header and footer of center column

Actually, you'll need to edit the tpl_index_default.php file in the includes/templates/stainless steel/templates directory. If it's not there, copy it over from the template_default directory.> <div class="centerColumn" id="indexDefault">

<h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1> <?php if (SHOW_CUSTOMER_GREETING == 1) { ?> <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2> <?php } ?>should be changed to > <div class="centerColumn" id="indexDefault"> <div id="centerColumnHeader></div> <h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1> <?php if (SHOW_CUSTOMER_GREETING == 1) { ?> <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2> <?php } ?> Then, look for > <?php $show_display_category->MoveNext(); } // !EOF ?> </div> and replace with > <?php $show_display_category->MoveNext(); } // !EOF ?> <div id="centerColumnFooter"></div> </div>Once that's done, you can add the two calls to the stylesheet and add images, set height, etc.

BTW, it's not a good idea to use a file or folder name with a space in it. Your custom directory should be renamed to stainless_steel to prevent problems in the future.

Also, the validators are going crazy with all the "&H" throughout your site. You need to find all the &Hs and replace them with "&H". Same thing in your keywords and description.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

11 Aug 2008, 4:49 PM
#6
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: Adding an image for the header and footer of center column

I've made the two changes to the tpl_index_default.php file and tried adding it to the css for the footer. Still, nothing shows up. I even tried just using a background color just to see if it would show up. Nothing.

What am I doing wrong?

Thank you for point out the file name and about the &. I made the changes to take care of those issues.

https://www.jhelectronics.com
Using Zencart 1.3.9h

11 Aug 2008, 6:19 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,895
Plugin Contributions:
21

Re: Adding an image for the header and footer of center column

I don't see the divs in the file.

Also, I'd remove the "WentDadddy" and PayPal boxes till you get things working. They're both throwing too many errors for the browser. You can always reload them later.:no:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

11 Aug 2008, 7:28 PM
#8
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: Adding an image for the header and footer of center column

This is what I have in my css.

.centerColumnFooter
{
background-image : url("../images/sidefooter.gif");
background-repeat : no-repeat;
background-position : bottom;
}

What are you using to see the errors?

https://www.jhelectronics.com
Using Zencart 1.3.9h

11 Aug 2008, 9:38 PM
#9
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,895
Plugin Contributions:
21

Re: Adding an image for the header and footer of center column

You can not change something that does not exist. You need to add the divs to the page as I stated in post 5.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

11 Aug 2008, 9:50 PM
#10
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,895
Plugin Contributions:
21

Re: Adding an image for the header and footer of center column

I have a plug-in to firefox that validates the page you're on. It's the HTML Tidy validator.

There are some from W3c as well. If you're not using firefox, you can enter a URL at http://validator.w3.org/.

With the boxes removed, your site validates. When the boxes are added, their outdated code (img and BR calls) fails validation.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

12 Aug 2008, 1:52 AM
#11
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: Adding an image for the header and footer of center column

My site does not appear to be using the tpl_index_default.php at all. I've tried to change the template_default file and the div still does not show up. How would I found what is controlling the center column?

https://www.jhelectronics.com
Using Zencart 1.3.9h

12 Aug 2008, 2:27 AM
#12
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: Adding an image for the header and footer of center column

This is what the file looks like now.

<?php
/**
 * Page Template
 *
 * Main index page<br />
 * Displays greetings, welcome text (define-page content), and various centerboxes depending on switch settings in Admin<br />
 * Centerboxes are called as necessary
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_index_default.php 3464 2006-04-19 00:07:26Z ajeh $
 */
?>
<div class="centerColum" id="indexDefault">
<div id="centerColumnHeader></div>
<h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1>

<?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
<h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
<?php } ?> 

<!-- deprecated - to use uncomment this section
<?php if (TEXT_MAIN) { ?>
<div id="" class="content"><?php echo TEXT_MAIN; ?></div>
<?php } ?>-->

<!-- deprecated - to use uncomment this section
<?php if (TEXT_INFORMATION) { ?>
<div id="" class="content"><?php echo TEXT_INFORMATION; ?></div>
<?php } ?>-->

<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
<?php
/**
 * get the Define Main Page Text
 */
?>
<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
<?php } ?>

<?php
  $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
  while (!$show_display_category->EOF) {
?>

<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?>
<?php
/**
 * display the Featured Products Center Box
 */
?>
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?>

<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?>
<?php
/**
 * display the Special Products Center Box
 */
?>
<?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
<?php } ?>

<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS') { ?>
<?php
/**
 * display the New Products Center Box
 */
?>
<?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
<?php } ?>

<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?>
<?php
/**
 * display the Upcoming Products Center Box
 */
?>
<?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>

<?php
$show_display_category->MoveNext();
} // !EOF
?>
<div id="centerColumnFooter"></div>
</div> 

https://www.jhelectronics.com
Using Zencart 1.3.9h

12 Aug 2008, 4:21 AM
#13
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,895
Plugin Contributions:
21

Re: Adding an image for the header and footer of center column

Is the file in your override directory? If not, you will need to copy the one you've modified into your override. That's the only reason I could think of that it's not showing up.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

12 Aug 2008, 12:39 PM
#14
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: Adding an image for the header and footer of center column

It's in my ../includes/templates/stainless_steel/templates folder.

https://www.jhelectronics.com
Using Zencart 1.3.9h

14 Sep 2008, 7:45 PM
#15
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: Adding an image for the header and footer of center column

does any one know why it is not showing up?

https://www.jhelectronics.com
Using Zencart 1.3.9h