Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Side Menu - Hover Expansion or Keeping Default Main Page While Clicking

Side Menu - Hover Expansion or Keeping Default Main Page While Clicking

Views: 1,513

Results 1 to 8 of 8
07 Feb 2011, 20:51
#1
brooklynartist avatar

brooklynartist

New Zenner

Join Date:
Jan 2011
Location:
Brooklyn
Posts:
75
Plugin Contributions:
0

Side Menu - Hover Expansion or Keeping Default Main Page While Clicking

Hi. I'm hoping someone has some insight into this. I'd like to bypass all the displaying of Subcats, Featured products, or New Product listings appearing in the main section when Categories and SubCategories are being clicked on my leftside menu.

http://focalpointhardware.net/index.php

Here is my Best Case Scenario followed by one I'd settle for:

A) When a user moves his/her mouse over the word "Categories" the menu expands (activated by a hover, not a click). Likewise a hover over a SubCategory, like "Mirrors", expands that SubCategory to show the product level page links ("Table Top - Lit", "Table Top - Unlit", etc). All the while, nothing else on the page changes - the Default Main Page remains in that main column. When a product level link is clicked (like "Table Top - Lit"), the the main section displays the product listing as it normally does.

B) If HOVERING can't expand the menu, then I might settle for CLICKING without the click activating a change in the main section. My "Welcome to Focal Point's Special Online Sale" (define_main_page.php) would remain until a product level link is clicked (like "Table Top - Lit"). I know the Add-on Mod Click-Show-Hide Category Menu does something like this, but I'm not sure if I'd be stuck with boxes and dotted lines that display the connections between the SubCats. I'd like to keep the visual structure of my current menu.

Thanks for any help!

I'm using the current version of Zen Cart 1.3.9h

07 Feb 2011, 21:02
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Side Menu - Hover Expansion or Keeping Default Main Page While Clicking

There is at least one CSS flyout menu mod in Free Addons, and Categories Dressing can be used as a flyout with a few styling rules added to it (as described in its support thread, posts 1608 and 1647).

If you want the list to expand downward in the same column, with all following top categories remaining visible, you will need a javascript menu. There may be one in Free Addons; just be sure that it doesn't disable the menu for those without js.

07 Feb 2011, 21:12
#3
gjh42 avatar

gjh42

Black Belt

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

Re: Side Menu - Hover Expansion or Keeping Default Main Page While Clicking

Actually, those javascript menus require clicking to keep the latest category open; a CSS menu could do the same while just hovering, with some tweaking to its usual styling. You probably wouldn't really want that kind of hover operation, though - it's not very user-friendly.

07 Feb 2011, 21:30
#4
brooklynartist avatar

brooklynartist

New Zenner

Join Date:
Jan 2011
Location:
Brooklyn
Posts:
75
Plugin Contributions:
0

Re: Side Menu - Hover Expansion or Keeping Default Main Page While Clicking

Thanks for your replies!

Is it possible to tweek some PHP code to keep my default content displayed EXCEPT when a product level menu link is selected? Then I wouldn't have to JavaScript the menu.

Yes, I am wanting the menu subCats to stay in the column instead of flying out.

07 Feb 2011, 21:37
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Side Menu - Hover Expansion or Keeping Default Main Page While Clicking

Even if you tweaked some PHP to keep from changing the page content until a product (or non-category/product page) is clicked, you would still have a page reload. For what you describe, you really need the js Click-Show_Hide menu. CSS can do the showing/hiding on hover fine, but you will get distracting and unintended jumps as the mouse and the menu move, until you can be sure that latest-generation CSS3-capable browsers will be used to view your site.

The CSS3 transforms can ease out the hover state, and I think impose a delay so rapid mouseovers won't do anything. They will eliminate a lot of need for js when they are more widely supported (Firefox 4, maybe IE9 or 10?).

07 Feb 2011, 22:06
#6
brooklynartist avatar

brooklynartist

New Zenner

Join Date:
Jan 2011
Location:
Brooklyn
Posts:
75
Plugin Contributions:
0

Re: Side Menu - Hover Expansion or Keeping Default Main Page While Clicking

Thanks so much for your advice. I might just try out the Mod then.

My impetus for wanting to skip over the subCat headings and/or Featured Product listings on the way to the product level listing pages is because I don't find them all that useful for my purposes. If ALL products in a Category displayed when you selected it, I probably wouldn't bother with changing the function of my menu.

I know Zen Cart isn't perfect but its pretty incredible! I've been enjoying working with it!

Thanks again for you help!:bigups:

07 Feb 2011, 22:37
#7
gjh42 avatar

gjh42

Black Belt

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

Re: Side Menu - Hover Expansion or Keeping Default Main Page While Clicking

See if this helps: admin > Configuration > Product Listing > Show SubCategories on Main Page while navigating.

07 Feb 2011, 23:26
#8
brooklynartist avatar

brooklynartist

New Zenner

Join Date:
Jan 2011
Location:
Brooklyn
Posts:
75
Plugin Contributions:
0

Re: Side Menu - Hover Expansion or Keeping Default Main Page While Clicking

Turning that off gave me the idea of replacing the breadcrumb that precedes it with my homepage image.

IT WORKED! Now anywhere you click the menu that ISN'T at product level it appears your are staying on the homepage.

http://focalpointhardware.net/index.php

BUT.....I do have to say that it's a little disconcerting to be on a product listing page then click the menu again and be taken (presumably) back to the homepage. It's much more natural to stay on that page while browsing until you click another product listing page.

So I'll see what I can do with that Show-Hide mod, javascript be damned!