Left and Right Columns - turning them off

Three columns, two, or one - your choice

Turning off a column on specific pages

Firstly, if you don’t already have one, create an override file for tpl_main_page.php in your includes/templates/YOURTEMPLATE/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 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 wish 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 during checkout, add or edit the above block to read

if (in_array($current_page_base,explode(',','checkout_shipping,checkout_payment,checkout_confirmation')) ) {  
    $flag_disable_right = true;  
    $flag_disable_left = true;  
  }

To disable the right column for EZ-Pages 2 and 5,

if (isset($ezpage_id) && in_array($ezpage_id,explode(",",'2,5'))) {  
    $flag_disable_right = true;  
  }

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;  
  }

Turning off a column on EZ-Pages via Admin

If you wish to disable left or right columns on specific EZ-Pages, go to Admin > Configuration > EZ-Pages Settings.

To disable the left column on specific EZ-Pages, update the setting EZ-Pages Pages to disable left-column.

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.

Here’s another way to modify sidebox display on EZ-Pages.

Other options:




Still have questions? Use the Search box in the upper right, or try the full list of FAQs. If you can't find it there, head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified August 28, 2020 by Scott C Wilson (909e3a6).