Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Remove Right column from Sub Categories

Remove Right column from Sub Categories

Locked

Views: 1,120

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
15 Jul 2009, 11:05 PM
#1
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Remove Right column from Sub Categories

Hi I need to know how to remove the right column from all sub-categories. I can remove them on top level categories and pages but can't seem to work out how to remove sub categories. My code is below:

if (in_array($current_page_base,explode(",",'shippinginfo,privacy,conditions,contact_us,site_map,gv_faq,discount_coupon,unsubscribe,advanced_search,products_new,products_all')) ) {
$flag_disable_right = true;

}

if (in_array($cPath,explode(",",'74,83,75,70,69,68,76,77,80,73,78,71,82,79,72,81,6,1,24,25,26,27,28,29,30,31,32,33')) ) {
$flag_disable_right = true;
$flag_disable_left = false;
}

I tried something like

if (in_array($product_info&cPath,explode(",",'1_2_38&products_id=1')) ) {
$flag_disable_right = true;
$flag_disable_left = false;
}

But that doesn't work and tried a few variations.

Please can someone let me know how I would do this???

Thanks

Nick

15 Jul 2009, 11:15 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Remove Right column from Sub Categories

To affect the subcategory 1_2_38 page, add 1_2_38 to the list:

if (in_array($cPath,explode(",",'74,83,75,70,69,68,76,77,80,73,78,71,82,79,72,81,6, 1,24,25,26,27,28,29,30,31,32,33,1_2_38')) ) {
$flag_disable_right = true;
$flag_disable_left = false;
}

But if you want to affect all category and subcategory pages (but not the home page), try

if ($current_page_base == 'index' and !$this_is_home_page) {
$flag_disable_right = true;
$flag_disable_left = false;
}

You have a long list of pages to disable the right column on. What pages do you want it active on? It might be easier to write a short list for
$flag_disable_right = false;
}else{
$flag_disable_right = true;
}

15 Jul 2009, 11:19 PM
#3
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Remove Right column from Sub Categories

That was weird, didn't work when I tried that first off.

Works now though :)

Thanks

Nick