Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Disable left & right columns on category listing pages?

Disable left & right columns on category listing pages?

Views: 905

Results 1 to 5 of 5
23 Jan 2013, 1:35 PM
#1
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Disable left & right columns on category listing pages?

What would the correct IF statement to Disable left & right columns on category listing pages?

when I say category listing pages I mean listings of categories only, not the product listing pages.

Thanks in advance.

Phil

23 Jan 2013, 2:06 PM
#2
crazycucumber avatar

crazycucumber

Zen Follower

Join Date:
Jan 2006
Posts:
403
Plugin Contributions:
0

Re: Disable left & right columns on category listing pages?

You could use something like this :

if ($cPath == '2' or $cPath == '3') {
$flag_disable_right = true;
$flag_disable_left = true;
 }

I thought about using if cPath > 0 , but that would work on every page , and not what you want.

The best way would be if you have alot of cats is to make the cat listing into an array. and call that array to disable the side columns

23 Jan 2013, 3:15 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,085
Plugin Contributions:
56

Re: Disable left & right columns on category listing pages?

You could use this code fragment to cause the left and right columns to be disabled in a category listing page, but displayed on a product listing page:

if ($_GET['main_page'] == FILENAME_DEFAULT && zen_not_null($category_depth) && $category_depth != 'products') {
  $flag_disable_left = true;
  $flag_disable_right = true;
}
23 Jan 2013, 3:51 PM
#4
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Disable left & right columns on category listing pages?

lat9:

You could use this code fragment to cause the left and right columns to be disabled in a category listing page, but displayed on a product listing page:

if ($_GET['main_page'] == FILENAME_DEFAULT && zen_not_null($category_depth) && $category_depth != 'products') {
$flag_disable_left = true;
$flag_disable_right = true;
}


will give this a go, thats what I need I think. cheers
23 Jan 2013, 10:46 PM
#5
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Disable left & right columns on category listing pages?

lat9:

You could use this code fragment to cause the left and right columns to be disabled in a category listing page, but displayed on a product listing page:

if ($_GET['main_page'] == FILENAME_DEFAULT && zen_not_null($category_depth) && $category_depth != 'products') {
$flag_disable_left = true;
$flag_disable_right = true;
}


worked a treat Cheers!