Results 1 to 6 of 6
  1. #1
    Join Date
    May 2006
    Posts
    40
    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?ma...roducts_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. 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

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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.

  4. #4
    Join Date
    May 2006
    Posts
    40
    Plugin Contributions
    0

    Default 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?

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Eliminate header background image on product pages

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

    Code:
    // 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

    Code:
      
      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. #6
    Join Date
    May 2006
    Posts
    40
    Plugin Contributions
    0

    Default Re: Eliminate header background image on product pages

    Thank you, thank you, THANK YOU!

 

 

Similar Threads

  1. Eliminate right column on ALL Product Category Listing pages
    By lindenboy in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 6 Apr 2011, 10:35 PM
  2. Eliminate Space between Top Nav Bar and Header Image
    By C_R_C in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 21 May 2010, 11:33 PM
  3. Background image in EZ-Pages?
    By lj20272 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Dec 2009, 05:34 AM
  4. Background image in pages
    By busymum in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 4 Apr 2008, 10:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR