Forums / Templates, Stylesheets, Page Layout / I want to remove the right column in all category pages: tutorial didn't work for me

I want to remove the right column in all category pages: tutorial didn't work for me

Locked

Started by ktrainyo on 21 Jul 2009, 9:19 PM · Views: 1,524

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
21 Jul 2009, 9:19 PM
#1
ktrainyo avatar

ktrainyo

New Zenner

Join Date:
Jul 2009
Posts:
12
Plugin Contributions:
0

I want to remove the right column in all category pages: tutorial didn't work for me

I am sorry if this has been answered, but I couldn't find my situation in the forums.

I want to remove the right column in all category pages, so I followed the tutorial in the faq section, here is the url to that:

https://www.zen-cart.com/tutorials/index.php?article=233

This is the code I put in the proper place in the file:

if (in_array($cPath,explode(",",'3,8')) ) {
$flag_disable_right = true;
$flag_disable_left = false;
}

Because I am following a guide to create a custom template I am using my 'magic' template and uploaded the file to:

/includes/templates/magic/common

Nothing happened on the category pages. Is the file in the wrong place, or the wrong code?

Please help, I know its some simple stupid oversight.

21 Jul 2009, 10:40 PM
#2
ktrainyo avatar

ktrainyo

New Zenner

Join Date:
Jul 2009
Posts:
12
Plugin Contributions:
0

Re: I want to remove the right column in all category pages: tutorial didn't work for me

I think I have a better question:

In the code above I am mainly confused about the following yellow section:

if (in_array($cPath,explode(",",'3,8')) ) {
$flag_disable_right = true;
$flag_disable_left = true;
}

This is the portion which tells zen cart where to turn off the flags(which really means columns, right?) but why is this saying '3,8' and not category or something like that. Please let me know if there is a guide or thread that refers to these codes which allow easy reference for what things are called.

Thanks

22 Jul 2009, 9:28 PM
#3
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: I want to remove the right column in all category pages: tutorial didn't work for me

The 3 and 8 reference your category id's, you need to change these to the id numbers next to your categories in **admin - Catalog - Categories/Products
**

HunnyBee Design
"A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

10 Nov 2009, 7:03 PM
#4
tracstev avatar

tracstev

New Zenner

Join Date:
Apr 2008
Posts:
61
Plugin Contributions:
0

Re: I want to remove the right column in all category pages: tutorial didn't work for me

Hi

I am using seo urls and have added the category to the file however the right hand column still displays, i've cross checked the category id and it is correct but is still showing, any ideas (the right colum doesnt show on the product info pages so i know this file is working as it should)

if (in_array($current_page_base,explode(",",'product_info,7')) ) {
$flag_disable_right = true;

Any ideas? I feel that displaying the same columns on every page is poor for SEO due to duplicate content.

Thanks!!

10 Nov 2009, 7:40 PM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: I want to remove the right column in all category pages: tutorial didn't work for me

$cPath is not related to $current_page_base - you need a double if test in this case:```php
if (in_array($current_page_base,explode(",",'product_info')) or in_array($cPath,explode(",",'7')) ) {
$flag_disable_right = true;
}

11 Nov 2009, 10:57 AM
#6
tracstev avatar

tracstev

New Zenner

Join Date:
Apr 2008
Posts:
61
Plugin Contributions:
0

Re: I want to remove the right column in all category pages: tutorial didn't work for me

Thank you Glen, you are a star that worked a treat.