If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / All Other Contributions/Addons / CSS Dropdown menu for the header- With Categories!

CSS Dropdown menu for the header- With Categories!

Started by jettrue on 17 Feb 2007, 6:44 AM · Views: 618,977

Results 41 to 60 of 2,344
26 Feb 2007, 11:34 PM
#41
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Post #41 by birdoasis

jtschrade,

The menu should be dynamic, which means that the dropdown menu should be built as you add categories without you having to edit anything else.

Is it not working that way?

John Patrick
A Zen Cart Advocate!

26 Feb 2007, 11:53 PM
#42
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Post #42 by jettrue

birdoasis:

jtschrade,

The menu should be dynamic, which means that the dropdown menu should be built as you add categories without you having to edit anything else.

Is it not working that way?

He's asking that ONLY the categories show at the top. He would like the categories to be on the top level, vs. HOME CATEGORIES INFORMATION CONTACT US MY ACCOUNT SHOPPING CART.

Which I think can be done, it will just take a bit of adjusting. jtschrade, i'll look into this more soon.

27 Feb 2007, 2:19 AM
#43
jtschrade avatar

jtschrade

New Zenner

Join Date:
Jan 2007
Posts:
5
Plugin Contributions:
0

Post #43 by jtschrade

That is what I want. Basically, I want it to be arranged like the default setting where each category name is listed horizontally under the banner; but I want it to be a drop down where as you pass over a category the drop down shows the subcategories. Possibly combining the code from those two areas would work. But again, I'm a beginner.

3 Mar 2007, 6:51 AM
#44
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Post #44 by rainthebat

**Thank you very much for this CSS Dropdown menu ****Jade True.
Quite a beautiful piece of work! **

It works perfectly in Internet Explorer (probably by far the most popular browser the customers will be using anyways) but in Firefox there is a problem that occurs only when the font is enlarged twice beyond the normal size (truthfully I'm not sure if anyone wants their fonts this big, but perhaps). What seems to happen is that a gap between the menu and submenu makes it just big enough so the submenu can't actually be reached for clicking the link. Really no big-deal seeing as how only a small percentage of visitors would ever experience this, and they still have other ways to navigate. Here is a site ( http://www.fabricstashinc.com/cart ) where it happens, but I think it happens on any site with the menu.

Many thanks for this contribution!

3 Mar 2007, 11:48 AM
#45
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Post #45 by woodymon

jettrue:

He's asking that ONLY the categories show at the top. He would like the categories to be on the top level, vs. HOME CATEGORIES INFORMATION CONTACT US MY ACCOUNT SHOPPING CART.

Which I think can be done, it will just take a bit of adjusting. jtschrade, i'll look into this more soon.

Possibly can build the category dropdowns upon the Categories Tabs feature integrated into recent Zen Cart versions.

Admin > Configuration > Layout Settings > Categories-Tabs Menu > ON/OFF

However, displaying two different horizontal menu bars, one on top of the other, each with drop downs could prove problematic.

And the number of categories in a shop is dynamic, so designing the horizontal categories menu bar looks good when there is only two categories vs. ten or twenty or more top level categories and when to set the categories list to wrap, sounds like a tough job. And there are the subcategories to deal with.

3 Mar 2007, 10:02 PM
#46
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Post #46 by jettrue

rainthebat:

**Thank you very much for this CSS Dropdown menu ****Jade True.
Quite a beautiful piece of work! **

It works perfectly in Internet Explorer (probably by far the most popular browser the customers will be using anyways) but in Firefox there is a problem that occurs only when the font is enlarged twice beyond the normal size (truthfully I'm not sure if anyone wants their fonts this big, but perhaps). What seems to happen is that a gap between the menu and submenu makes it just big enough so the submenu can't actually be reached for clicking the link. Really no big-deal seeing as how only a small percentage of visitors would ever experience this, and they still have other ways to navigate. Here is a site ( http://www.fabricstashinc.com/cart ) where it happens, but I think it happens on any site with the menu.

Many thanks for this contribution!
You're welcome.

In my original design of this dropdown menu, I did everything in em's so that font resizing wouldn't be an issue. I did this as part of my Apple Zen template:
http://www.zencart137.jadetrue.com/

You'll notice the same issue doesn't occur there.

When I put the download together of the header menu only, I changed the em's to px's to avoid issues with people who were using a fixed width site.

What you can do is, open up the stylesheet_header_menu.css and change the first two instances of "25px" to "2.17em"

Then change div#dropMenu li a to this:
div#dropMenu li a {display: block; padding: .6em 25px ;text-decoration: none; text-transform:uppercase; color:#ffffff; text-align:center; border-right:1px solid #ffffff;}

4 Mar 2007, 2:35 AM
#47
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Post #47 by rainthebat

Thanks Jade,
I see how changing the height from pixels to ems would allow this menu to function perfectly when the text size is increased.

5 Mar 2007, 4:58 AM
#48
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Post #48 by woodymon

jettrue:

Open up your stylesheet_lightbox.css and add a zero to the end of all of the z-index's. So if it says "z-index:10", change it to "z-index:100"
If it says "z-index:90", change to "z-index:900", etc.

Hi Jade,

Finally installed your new the header dropdown menu mod on Zen Cart v.1.37. Very nice and thanks :thumbsup:

I also have Zen Lightbox installed and I too observed same issue of menu bar showing over Lightbox image (in both Firefox and IE). Then followed your CSS edit instructions above and the menu now appears behind the image, which is much better. Thanks.

However would you have any CSS tricks up your sleeve on how to "completely" hide the header menu on the lightbox image pages? :wink2:

Also I note after changing the CSS above to display the the menu bar behind the Zen Lightbox image, the menu bar links and dropdowns are still "live" and clickable in IE, but not in Firefox.

Woody

5 Mar 2007, 5:16 AM
#49
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Post #49 by jettrue

Woodymon:

Hi Jade,

Finally installed your new the header dropdown menu mod on Zen Cart v.1.37. Very nice and thanks :thumbsup:

I also have Zen Lightbox installed and I too observed same issue of menu bar showing over Lightbox image (in both Firefox and IE). Then followed your CSS edit instructions above and the menu now appears behind the image, which is much better. Thanks.

However would you have any CSS tricks up your sleeve on how to "completely" hide the header menu on the lightbox image pages? :wink2:

Also I note after changing the CSS above to display the the menu bar behind the Zen Lightbox image, the menu bar links and dropdowns are still "live" and clickable in IE, but not in Firefox.

Woody

No, I wouldn't know how to "completely" hide it, but changing #overlay's z-index to 1000 will help hide it like the rest of the site. Perhaps that will help it from still functioning as well.

5 Mar 2007, 5:49 AM
#50
shackle avatar

shackle

Zen Follower

Join Date:
Apr 2006
Posts:
228
Plugin Contributions:
0

Post #50 by shackle

to fix the Lightbox issue.....

In tpl_header.php add this code:

  [b] <div class="flash">[/b]<?php require($template->get_template_dir('tpl_drop_menu.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_drop_menu.php');?>[b]</div>[/b]

Just add: <div class="flash"> menu code here. </div> around the menu code.

This will fix the lightbox issue at least it does for me. You get the same issue with flash objects.

Ps. make sure you have the latest lightbox

5 Mar 2007, 10:57 PM
#51
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Post #51 by woodymon

shackle:

to fix the Lightbox issue..... In tpl_header.php add this code:

[b] <div class="flash">[/b]<?php require($template->get_template_dir('tpl_drop_menu.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_drop_menu.php');?>[b]</div>[/b]

That fixed it. Thanks for the tip! Now I can return the lightbox css z-index settings back to normal/original :wink2:

Woody
6 Mar 2007, 4:57 AM
#52
hitch avatar

hitch

New Zenner

Join Date:
Sep 2006
Posts:
75
Plugin Contributions:
0

Post #52 by hitch

Hi, I have this addon working really well but a small bug i can't get rid of in IE. When i hover over the menu and leave the menu system on a submenu when i return the submenu appears blank until reset by hovering over it again.

I have tested it on all the other member's sites i can find and get the same problem.

Any help would be appreciated

:D

6 Mar 2007, 8:00 AM
#53
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Post #53 by woodymon

hitch:

Hi, I have this addon working really well but a small bug i can't get rid of in IE. When i hover over the menu and leave the menu system on a submenu when i return the submenu appears blank until reset by hovering over it again.

I have tested it on all the other member's sites i can find and get the same problem.
I do not observe this in IE6. What's your URL?

6 Mar 2007, 9:35 AM
#54
hitch avatar

hitch

New Zenner

Join Date:
Sep 2006
Posts:
75
Plugin Contributions:
0

Post #54 by hitch

Thanks for the quick reply.

The link is http://www.musicservices.co.nz/killer/ . It's still a work in progress (so don't be harsh) but the menu's there. As i said i get the same on other members sites who use the same menu.

I've not tried IE6, IE7 is what I'm using and having trouble with. all other browsers seem fine. When i drag down to a low level sub-menu and fall off the menu it re-appears blank on next selection. just looks messy.

thanks for any time you spend on it!

15 Mar 2007, 2:26 PM
#55
disciple avatar

disciple

Totally Zenned

Join Date:
Aug 2004
Posts:
278
Plugin Contributions:
0

Post #55 by disciple

Hi,

Is it possible to place the new products, all products, etc. under the categories menu dropdown rather than the home dropdown?

I would also like to take out one of the categories, a document category, from that categories dropdown as well. I have already placed that category in another dropdown menu section but can't seem to figure out how to keep it from showing in the categories dropdown.

Thanks in advance for your help and such a great contribution.

Rick

15 Mar 2007, 5:58 PM
#56
shackle avatar

shackle

Zen Follower

Join Date:
Apr 2006
Posts:
228
Plugin Contributions:
0

Post #56 by shackle

I really love this menu saves me a lot of time then having to make one.

There is one feature I would like to see though to make it even more hassle free.

The "information" part be tied to ez-pages kinda like the categories are. So you can add pages to the menu very easily. This sounds like a neat idea to me if possible. I'm sure many others would like this feature also! :)

Thanks for the mod!

16 Mar 2007, 4:47 AM
#57
disciple avatar

disciple

Totally Zenned

Join Date:
Aug 2004
Posts:
278
Plugin Contributions:
0

Post #57 by disciple

All you need to do is create an ez-page link and include it in your menu and it works perfectly. I use one or two in our menus

16 Mar 2007, 12:17 PM
#58
shackle avatar

shackle

Zen Follower

Join Date:
Apr 2006
Posts:
228
Plugin Contributions:
0

Post #58 by shackle

Yeah I know that However, I said I'd like it to automatically include ez-pages in the menu when you make them. Kinda like the categories are with the menu now.

So you don't have to manually edit the files. To me it seems like a lot less hassle if it's possible.

disciple:

All you need to do is create an ez-page link and include it in your menu and it works perfectly. I use one or two in our menus

17 Mar 2007, 9:24 AM
#59
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Post #59 by woodymon

shackle:

I'd like it to automatically include ez-pages in the menu when you make them. Kinda like the categories are with the menu now. So you don't have to manually edit the files. To me it seems like a lot less hassle if it's possible.
That same feature suggestion came up earlier in this thread and Jade replied he would add that feature into the next update.

Woody

17 Mar 2007, 5:50 PM
#60
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Post #60 by jettrue

shackle:

Yeah I know that However, I said I'd like it to automatically include ez-pages in the menu when you make them. Kinda like the categories are with the menu now.

So you don't have to manually edit the files. To me it seems like a lot less hassle if it's possible.

Hi There,

I've come up with a solution for this... its a bit of a work around, but is working well. You can see it in action at http://www.zencart137.jadetrue.com.

I'm not sure whether to release this as part of the module for everyone and update it, OR to just offer the files for this add on separately. I know its going to cause me problems for people who don't want this, LOL.

I've set this up so that any ezpages added show up BELOW the regular information pages (shipping, privacy, conditions of use, etc.). This can of course be manually changed for people who may want to have the ezpages first, or who may want to remove some of the regular information links.

There are two files that need to be added:

includes/modules/sideboxes/YOUR_TEMPLATE/ezpages_drop_menu.php
includes/templates/YOUR_TEMPLATE/tpl_ezpages_drop_menu.php

and then of course there is a change to:
includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php

I'm going to attach the two new files mentioned above in a zip file, for those that want this functionality now. I think I will eventually add this to the download, just need to test this out with people that want it now, so I know better what I need to add to the instructions.

STEP 1.
Upload the files included in the zip file to these locations:

includes/modules/sideboxes/YOUR_TEMPLATE/ezpages_drop_menu.php
includes/templates/YOUR_TEMPLATE/tpl_ezpages_drop_menu.php

Step 2.

Add this code to includes/templates/YOUR_TEMPLATE/tpl_drop_menu.php:

<?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>

I personally added the above code right after the last item in the "INFORMATION" drop down, so I put it right after:

<li><a href="<?php echo zen_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_UNSUBSCRIBE; ?></a></li> <?php } ?>

You can add it anywhere in the INFORMATION box, or basically anywhere inside of a current drop down, but I did not design this mod to be its OWN main drop down.

Step 3.
Then you have to go to your admin, and go to "Tools", "Layout Boxes controller". There should be a new sidebox, if you'd uploaded things correctly. You must turn the SINGLE COLUMN STATUS TO ON, leave the LEFT/RIGHT COLUMN STATUS off.

Step 4.

Under "Tools", "EZPages", make sure the ezpages are set to ON for the header. The sort orders also have to be greater than "0". If you want to have the regular zen cart horizontal header bar off, go to "Configuration", "EZPages Settings", and turn the header bar display status to off (0).

I think that's it. :cool:

So now you can have any number of EZPages setups. You can have the regular EZPages horizontal header bar on, or have the regular EZpages sidebox on, or you can have them in your css drop down menu, OR any combination of the three.