Can I turn off the left or right hand columns for some pages only?

Yes, you can. Firstly, if you don't already have one, create an over-ride file for tpl_main_page.php in your includes/templates/YOUR_TEMPLATE/common directory.

There is enormous scope within this one module to create turn the left and right hand columns on and off according to which page or category is to be displayed. Open it up and you will see a large comment at the top explaining some of them. Here are a few examples to help illustrate that ...

If you wished to turn off the left hand column for the "contact us" and "terms & conditions" pages, find the following block of code
  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 edit it to read
  if (in_array($current_page_base,explode(",",'contact_us,conditions')) ) {
     $flag_disable_left = true;
  }


If you wished to disable both columns in category listings either add or edit the above block to read
if (in_array($cPath,explode(",",'3,8')) ) {
    $flag_disable_right = true;
    $flag_disable_left = true;
  }


To disable the right column for a series of EZ-Pages
    if (in_array($ezpage_id,explode(",",'2,5'))) {
    $flag_disable_right = true;
  }
 

Or, you can use the settings in Admin->Configuration->EZ-Pages Settings:
For example:
EZ-Pages Pages to disable left-column 
EZ-Pages "pages" on which to NOT display the normal "left" column (of sideboxes) for your site. 
Simply list page ID numbers separated by commas with no spaces. 
Page ID numbers can be obtained from the EZ-Pages screen under Admin->Tools. 
ie: 21 
or leave blank.

Alternate article: http://tutorials.zen-cart.com/index.php?article=249


To turn off the left column for the home page only, you would insert the following:
  if ($this_is_home_page) {
     $flag_disable_left = true;
  }
  • 6 Users Found This Useful
Was this answer helpful?

Related Articles

How can I find out what version of Zen Cart or PHP or MySQL I'm using?

To find out what version of Zen Cart or PHP or MySQL you are currently using, you can simply go...

Getting a BLANK PAGE? Here's the answer ...

If you're getting a blank page when trying to browse to a certain page on your store, or after...

What's New in the Upcoming v2.0 release?

Database Abstraction Layer and Sql CacheThe abstraction layer has been re-factored to include a...

Image Preparation - How-to

I've seen several posts where people obviously aren't quite sure about the best way to set up...

Some tips to modify stylesheet

1. Download Web Developer extension for FireFox here2. Install & restart FireFox. You should...