Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2005
    Posts
    30
    Plugin Contributions
    0

    Default Remove Left Column from Index Page Only

    Hi there! I am trying to remove the left column from the main/index/home/landing page in Zen Cart so I can have a completely custom page that is still within the Zen framework.

    We want the left column to appear everywhere else through the system, but just not the homepage.

    I tried a couple things, but nothing is working. Any ideas how I can swing that?

    Thanks!

  2. #2
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Remove Left Column from Index Page Only

    In includes -> templates -> template_default -> common -> tpl_main_page.php

    find the following:

    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;
      }
    and change it as follows:

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

  3. #3
    Join Date
    Nov 2005
    Posts
    30
    Plugin Contributions
    0

    Default Re: Remove Left Column from Index Page Only

    Thanks for the info! I gave it a spin, and it took of the left column on the index page, but it also took it off on all other pages...like the category listings and product pages. I just need it off of the inital landing page: www.somesite.com/zen_cart/index.php

    Thanks!

  4. #4
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Remove Left Column from Index Page Only

    try changing "index" to "index_home" and see if that works.

  5. #5
    Join Date
    Nov 2005
    Posts
    30
    Plugin Contributions
    0

    Default Re: Remove Left Column from Index Page Only

    Thanks! Using index_home in there didn't quite do it. I tried several other variations, but that didn't work, either. I went back and put just "index" in there. It took it off the home page, and the category list pages. But I was incorrect when I said that it took the column off the product pages...the left column appears there as I want. But I still want the left column on the category listing pages. So I'm half way there. Anything else I can try, or should I just be happy with what I have? Thanks!

  6. #6
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Remove Left Column from Index Page Only

    One last thing to try. replace the code I gave you with this

    Code:
     if ($current_page_base == 'index' and $cPath == '') {
     $flag_disable_left = true;
     }
    // 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_left = true;
      }

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Remove Left Column from Index Page Only

    Would changing Clyde's first line to read:

    if ($this_is_home_page) {

    be helpful?

  8. #8
    Join Date
    Nov 2005
    Posts
    30
    Plugin Contributions
    0

    Default Re: Remove Left Column from Index Page Only

    Thanks, everyone! I tried both Clyde's and Rob's ideas, and the both worked perfectly. Thanks!!

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

    Default Re: Remove Left Column from Index Page Only

    The
    if ($this_is_home_page) {
    is a recently released option that is great for this one purpose.

    The test Clyde mentions in post 6 is powerful, flexible and reasonably intuitive, and can be modified to control many different situations. Everyone who wants to customize element usage should become familiar with it.

    Just my 2c.

 

 

Similar Threads

  1. How to remove left column on index page?
    By Alexiss in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 17 Oct 2011, 09:33 AM
  2. How to Remove the Left Column from the Product Info Display Page??
    By autoace in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 20 Aug 2009, 03:37 PM
  3. Remove logo header from index page only
    By acreativepage in forum General Questions
    Replies: 7
    Last Post: 15 Aug 2009, 08:08 PM
  4. Need help to remove left and right column from template
    By jeba in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Jul 2009, 03:08 PM
  5. Remove left column from product page
    By jford in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 30 Mar 2009, 09:59 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