Forums / Templates, Stylesheets, Page Layout / Removing side boxes from Category Page?

Removing side boxes from Category Page?

Locked

Views: 1,270

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
21 May 2007, 1:44 AM
#1
mcanes avatar

mcanes

Zen Follower

Join Date:
May 2007
Posts:
210
Plugin Contributions:
0

Removing side boxes from Category Page?

Ok, I got another question. I would like to have my category pages be custom HTML that I will put together to link to each section. What I would like to do is remove the side boxes, so I am left with just a header, blank white space for my custom HTML and the footer left.

This is similiar to the question I asked regarding the home page, but I also would like to do this on the category landing page. Below is a screen shot of what I am trying to achieve...

I should note, I only want this to happen at my parent categories, not the sub-categories.

Thanks.

21 May 2007, 2:00 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Removing side boxes from Category Page?

For this, you will want to test for $cPath being equal to any of your top category id's.

Look at the Parent Categories Separated In 3 sideboxes thread for how to code this test; or if you have just a few top cats (e.g. 1, 3, 4 and 13), you can just say

if (($cpath == 1) or ($cpath == 3) or ($cpath == 4) or ($cpath == 13)) {
$flag_disable_left = 'true' etc.

21 May 2007, 2:39 AM
#3
mcanes avatar

mcanes

Zen Follower

Join Date:
May 2007
Posts:
210
Plugin Contributions:
0

Re: Removing side boxes from Category Page?

Thanks, I only have like 5 or 6 Parent categories so I will just do the simple way. Thanks :yes:

27 Jun 2007, 3:17 AM
#4
mcanes avatar

mcanes

Zen Follower

Join Date:
May 2007
Posts:
210
Plugin Contributions:
0

Re: Removing side boxes from Category Page?

Glenn,

I have run into a problem with this... The simple way you described works great on the parent categories, but it also removes them from any sub categories of that parent.

Example...

if (($this_is_home_page) or ($cPath==1) or ($cPath==2))
{
   $flag_disable_left = true;
   $flag_disable_right = true;
} 

With this code it will do what I want when looking at cats one and two like index.php?main_page=index&cPath=2. But when I go to index.php?main_page=index&cPath=2_7 it removed them from there are well...

Is there any way around this or do I have to go add them back manually by putting this code in too?

if (($cPath=='2_7') or (XXX) or (XXX)
{
   $flag_disable_left = false;
   $flag_disable_right = true;
}
27 Jun 2007, 3:34 AM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Removing side boxes from Category Page?

The quotes around the number are the key. I neglected to include them in my example, so it was testing for cPath being 1 which I think means "true" or "having a value" in this circumstance, and always finding it so when on any cat/product page.

Just do as your own example shows, and test for

if (($this_is_home_page) or ($cPath=='1') or ($cPath=='2'))

27 Jun 2007, 4:06 AM
#6
mcanes avatar

mcanes

Zen Follower

Join Date:
May 2007
Posts:
210
Plugin Contributions:
0

Re: Removing side boxes from Category Page?

Okay... I believe that works how I want now. Thanks again for your help.