Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Turning off columns issues with if(cpath ....

Turning off columns issues with if(cpath ....

Locked

Views: 863

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
14 Oct 2010, 8:10 PM
#1
monkeyjr47906 avatar

monkeyjr47906

New Zenner

Join Date:
Nov 2007
Posts:
72
Plugin Contributions:
0

Turning off columns issues with if(cpath ....

Hello - I've used this code in the past to turn off columns in my categories pages ....

if (in_array($cPath,explode(",",'1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,66,67,68,69,70')) ) {
$flag_disable_right = true;
}

but now it doesn't seem to work since I upgraded to 1.3.9 because a URL that looked like this ...
/index.php?main_page=index&cPath=84
now looks like this ...
/index.php?main_page=index&cPath=3_84

I think the underscore may be causing a problem?

14 Oct 2010, 8:53 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Turning off columns issues with if(cpath ....

What happens if you use:
$current_category_id

instead of:
$cPath

on that? :unsure:

20 Oct 2010, 6:31 PM
#3
shortysclimbin avatar

shortysclimbin

New Zenner

Join Date:
Oct 2010
Location:
San Juan Puerto Rico
Posts:
62
Plugin Contributions:
0

Re: Turning off columns issues with if(cpath ....

On the same lines... I want to remove both columns on the main page I am assuming just adding in the following to Define_main_page.php will work?

$center_column_only = array('main_page');
if (in_array($current_page_base,$center_column_only) ) 
{
  $flag_disable_right = true;
  $flag_disable_left = true;
}

Did I miss anything? I try it and my page goes to all text. I think I am missing something, but I am unsure. Still learning this code base.