Forums / Templates, Stylesheets, Page Layout / Disabling the Category nav on the catalog index page

Disabling the Category nav on the catalog index page

Locked

Views: 2,950

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

ktomas

New Zenner

Join Date:
Nov 2008
Posts:
71
Plugin Contributions:
0

Disabling the Category nav on the catalog index page

OK, I've been able to disable specific items on the home page as desired, however, it's disabling the elements on too many pages.

I used the following code

if (in_array($current_page_base,explode(",",'index')) ) {
    $flag_disable_left = true;
  }

Which is successful in hiding the left sidebox on the home page, but it's also hiding it on the subsequent pages that lead up to the first product.

Take a look

HOME PAGE --> sidebox correctly disabled.

DESIGN YOUR OWN
--> sidebox INCORRECTLY disabled

This continues until you navigate to a product. If you'd like to follow along, use RINGS/GOLD BAND as your product.

CUSTOM RING GOLD BAND
--> sidebox correctly displayed

9 Jul 2009, 6:45 PM
#22
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Disabling the Category nav on the catalog index page

OK, I've been able to disable specific items on the home page as desired, however, it's disabling the elements on too many pages.

I used the following code
I assume that this is in tpl_main_page.php

Try creating a dir in your template folder, and I believe that the name should be "index_home" and place this file in that folder and it should only be used for the home page

Remove it from your template/common folder

Zen-Venom Get Bitten

9 Jul 2009, 8:51 PM
#23
ktomas avatar

ktomas

New Zenner

Join Date:
Nov 2008
Posts:
71
Plugin Contributions:
0

Re: Disabling the Category nav on the catalog index page

kobra:

I assume that this is in tpl_main_page.php

Try creating a dir in your template folder, and I believe that the name should be "index_home" and place this file in that folder and it should only be used for the home page

Remove it from your template/common folder

I can't remove it from the common folder, because I have custom elements in there that DO need to be carried over to all of the pages.

I tried to create the index_home directory and include a separate tpl_main_page.php file with instructions to disable the sidebars, but this was not successful.

Sidebar still exists

9 Jul 2009, 8:58 PM
#24
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Disabling the Category nav on the catalog index page

I tried to create the index_home directory and include a separate tpl_main_page.php file with instructions to disable the sidebars, but this was not successful.
Try naming it indexhome and/or home instead

Zen-Venom Get Bitten

9 Jul 2009, 9:05 PM
#25
ktomas avatar

ktomas

New Zenner

Join Date:
Nov 2008
Posts:
71
Plugin Contributions:
0

Re: Disabling the Category nav on the catalog index page

kobra:

Try naming it indexhome and/or home instead

Nope. I just realized that I have more that needs to be different on the home page as well. I'm going to have to play around for a while on separating this page from the rest. There have been multiple suggestions in this thread, it's just getting slightly confusing.

9 Jul 2009, 9:58 PM
#26
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Disabling the Category nav on the catalog index page

Yes , separating the main page can be hard. And you've had a lot of suggestions so I understand what you are saying. A very easy solution to this was pointed out by Speeke on another thread.

To get rid of the left hand column on the home page only use:

#indexHomeBody #navColumnOne{display:none;}

This is so simple that I thought it was worth mentioning.

You could apply this to any element that is in your layout.

Stop reading now if you want to:smile: Perhaps a solution to your problem is to clone the categories box so that it appears in both your left and right columns. Then simply, with the aid of the above, get rid of either or both of the columns on a page by page basis from the css.

Nick
iszent.com

12 Jul 2009, 10:15 PM
#27
gjh42 avatar

gjh42

Black Belt

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

Re: Disabling the Category nav on the catalog index page

Did you ever try this?```php
if ($this_is_home_page) {
$flag_disable_header = true;
$flag_disable_left = true;
$flag_disable_right = true;
$flag_disable_footer = true;
}

It is the best way to specifically address the home page.

/index_home/ doesn't work - it was the first thing I tried a long time ago. I don't know of a foldername that will apply to the home page only, though there ought to be one.