Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Eliminate header background image on product pages

Eliminate header background image on product pages

Locked

Views: 2,182

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
2 Jun 2006, 3:38 AM
#1
empirenine avatar

empirenine

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Eliminate header background image on product pages

Hey guys!

I'm working on a t-shirt website with a large header on the homepage. I need that header to either shrink (vertically) or disappear on the product info pages, but not in product listings or the homepage.

Here's the home page with the correct header:
http://zend.empire9.com/

Here's a product page where I would like the large header image to disappear:
http://zend.empire9.com/index.php?main_page=product_info&products_id=180

SIDE NOTE: Please do not be offended by the product I have linked to above. We are a sarcastic t-shirt company, and we are also an equal opportunity discriminater. :smile: With that said, the product is a bit racey.

I'm almost sure this requires a few variables to be coded, but if anyone can help with that it would be much appreciated.

Thanks in advance!

Mike

LMNOtees.com - Wear your humor on your sleeve!

2 Jun 2006, 2:52 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Eliminate header background image on product pages

For a very simple way to eliminate the header on product info pages only, look at the comments at the top of /templates/template_default/common/tpl_main_page.php.

It gives instructions for selective disabling of page elements.

2 Jun 2006, 3:10 PM
#3
gjh42 avatar

gjh42

Black Belt

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

Re: Eliminate header background image on product pages

If you still want a header but with a different image, you can put in tpl_header.php a test for index.php?main_page=product_info. I'm not sure of the exact syntax to use, but if you're interested look it up. I've seen similar test code somewhere around. If you can't figure it out, ask again.

6 Jun 2006, 12:54 AM
#4
empirenine avatar

empirenine

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Re: Eliminate header background image on product pages

Does anyone else know the exact code for this? I'm seeing the instructions in that header, but they don't give specifics about how to differentiate a product page from an index page.

Any help?

LMNOtees.com - Wear your humor on your sleeve!

6 Jun 2006, 6:25 AM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Eliminate header background image on product pages

The current page test code is right in tpl_main_page.php!

// the following IF statement can be duplicated/modified as needed to set additional flags
  if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
  }

So add this

  
  if (in_array($current_page_base,explode(",",'product_info')) ) {
    $flag_disable_header = true;
  }

and when you are on a product info page, voila, no header.

6 Jun 2006, 6:37 AM
#6
empirenine avatar

empirenine

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Re: Eliminate header background image on product pages

Thank you, thank you, THANK YOU!

LMNOtees.com - Wear your humor on your sleeve!