Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    help question Hide left and right columns on main_page...

    Is it possible to hide both the left and right columns when the main page is displayed?

    I would like them to appear for all product pages and category pages, but just no the main home page.

  2. #2
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Hide left and right columns on main_page...


  3. #3
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Hide left and right columns on main_page...

    Thanks for the above link.

    I've currently added the following code to my tpl_main_page.php (in my overrides folder.

    Code:
      if ($current_page_base == 'index') {
      $flag_disable_left = true;
      }
    While this works, it disables the left column on all category and sub-category pages too - which I don't want.

    I would just like to disable the left column on the main page (index page).

    Is this possible?

  4. #4
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Hide left and right columns on main_page...

    Ok, I've just sorted this by replacing my previous code with the following...

    Code:
      if ($_GET['main_page'] == 'index' and $current_category_id=='') {
      $flag_disable_left = true;
      }

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Hide left and right columns on main_page...

    To know that you are on the absolute main page ... there is a variable:
    $this_is_home_page

    When true, you are on the main page based on your configuration and you do not have to worry about settings etc.

    PHP Code:
    if ($this_is_home_page == true) {
    // I am the main page
    } else {
    // I am not the main page

    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Hide left and right columns on main_page...

    Thanks Ajeh!

    It's all beginning to come together now! :)

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Hide left and right columns on main_page...

    Aren't jigsaw puzzels fun?! All the peices and parts fit perfectly, you just have to grab the right peice ... easy smeazy ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Turn off right and left columns front page only
    By cshart in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 24 Dec 2010, 04:24 AM
  2. Attributes columns, Left and Right
    By broknspyrl in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 12 Aug 2006, 07:21 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