Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2006
    Posts
    8
    Plugin Contributions
    0

    Default Disable Header for all but first page

    Hey guys, I've been hacking away at zen cart for a few weeks now for a site I'm working on, and so far so good. These forums have been a great help and so far I've been quite pleased with my progress. I have one thing that is confusing me at the moment though...

    The page is at: http://www.lheritagearts.com/gallery/

    I want to disable the header for every page except for the first page of the gallery. The person I am working on this for felt (rightfully so) that having the header and intro text on every page sort of redundant and that it would be better for the user to not have to scroll through it every time. So far I have been partially successful at getting what I want by using this flag to disable the headers:

    Code:
    <?
    if ($current_page_base == 'index' and $cPath >= '67') {
     $flag_disable_header = true;
    }
    ?>
    This seems to knock out the header everywhere I need it to except for when you go to an individual entries (for example: http://www.lheritagearts.com/gallery...oducts_id=191). So I figure I'm just missing something really simple here, any help would be much appreciated!

  2. #2
    Join Date
    Sep 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: Disable Header for all but first page

    Oh yeah, the page where i added to code to disable the headers was in tpl_main_page.php.

    Sorry for not mentioning that before.

  3. #3
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Disable Header for all but first page

    You're in the right place and going about it in broadly the right way, but can you just clarify, do you, or do you not want the header on non-product pages such as contact us, privacy, checkout, shopping cart? I could infer either from the site's current state and your original post.

    P.S. Very nice looking site.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  4. #4
    Join Date
    Sep 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: Disable Header for all but first page

    I only want to see the header when you go to lheritagearts.com/gallery, and nowhere else in the gallery. The client only wants to see it once and not on any subsequent pages because they feel it is redundant.

    PS: Thanks! I'm definitely a designer first and a coder second

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Disable Header for all but first page

    I'd go for
    <?
    if (($current_page_base == 'index' and (int)$cPath >0) or $current_page_base !='index') {
    $flag_disable_header = true;
    }
    ?>
    The differences are that I have excluded all category pages (which are built from the index file, rather than just those categories with IDs greater than 67 (which works for you due to an anomoly in your data), and have then gone on to also exclude all other pages, such as the ones I listed earlier.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Sep 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: Disable Header for all but first page

    Thanks for your help!

    I'll give that a shot later today when I'm around my work computer again.

    Here's hoping that does the trick! Thanks again for the quick reply!

 

 

Similar Threads

  1. Header Logo - One for the Home Page, one for all other pages?
    By CultureClick in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 18 Jun 2012, 12:56 PM
  2. Replies: 1
    Last Post: 29 Dec 2011, 03:31 PM
  3. Unique multimedia header for home page. Regular for all others. How?
    By Bachus in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Jun 2011, 10:00 AM
  4. disable flat rate shipping for paypal only (but enable for googlecheckout)
    By btman in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 14 Jul 2009, 05:51 AM
  5. Disable Category Sidebox on all but one ezpage
    By CyberWoolf in forum Basic Configuration
    Replies: 6
    Last Post: 18 Mar 2009, 02:44 AM

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