Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / I want to make a dynamic drop-down menu for TOP LEVEL categories

I want to make a dynamic drop-down menu for TOP LEVEL categories

Locked

Views: 1,285

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
19 Aug 2010, 2:53 AM
#1
knockoutcomputers avatar

knockoutcomputers

New Zenner

Join Date:
Feb 2010
Posts:
7
Plugin Contributions:
0

I want to make a dynamic drop-down menu for TOP LEVEL categories

I want to make a dynamic drop-down menu for the header that includes the TOP LEVEL categories, and listed below them, the FIRST SUB LEVEL categories - but no further. The idea is a menu similar to major e-commerce sites. A live example off the top of my head would be newegg.com

It needs to report the categories in the following way:

<ul> <li>Top Cat 1</li> <ul> <li>Sub Cat A</li> <li>Sub Cat B</li> </ul> <li>Top Cat 2</li> <ul> <li>Sub Cat C</li> <li>Sub Cat D</li> </ul> <li>Top Cat 3</li> (no sub categories) </ul>

Currently it reports more something like this:

<ul> <li>Top Cat 1</li> <li>Top Cat 2</li> <li>Top Cat 3</li> </ul>

I know very little PHP and have been slowly moving along customizing the code... but this is a little over my head for doing it by myself I think.

I believe the code I need to change is in includes/modules/[MY TEMPLATE]/categories_tabs.php

Can anyone help me do this? I realize the basics of what needs to be done but don't know how to format the code, or all the 'commands' I need to use. Playing with it I was only able to get it to report sub categories and top level together.

THANKS IN ADVANCE!

19 Aug 2010, 3:35 AM
#2
knockoutcomputers avatar

knockoutcomputers

New Zenner

Join Date:
Feb 2010
Posts:
7
Plugin Contributions:
0

Re: I want to make a dynamic drop-down menu for TOP LEVEL categories

Third time posting I know - but I can't EDIT MY OWN POSTS!!!!! So I guess I'll have to re-post tell I get it right lol. Accidentally pasted wrong title last time, and the first time I put in wrong thread...

I want to make a dynamic drop-down menu for the header that includes the TOP LEVEL categories, and listed below them, the FIRST SUB LEVEL categories - but no further. The idea is a menu similar to major e-commerce sites. A live example off the top of my head would be newegg.com

It needs to report the categories in the following way:

<ul> <li>Top Cat 1</li> <ul> <li>Sub Cat A</li> <li>Sub Cat B</li> </ul> <li>Top Cat 2</li> <ul> <li>Sub Cat C</li> <li>Sub Cat D</li> </ul> <li>Top Cat 3</li> (no sub categories) </ul>

Currently it reports more something like this:

<ul> <li>Top Cat 1</li> <li>Top Cat 2</li> <li>Top Cat 3</li> </ul>

I know very little PHP and have been slowly moving along customizing the code... but this is a little over my head for doing it by myself I think.

I believe the code I need to change is in includes/modules/[MY TEMPLATE]/categories_tabs.php

Can anyone help me do this? I realize the basics of what needs to be done but don't know how to format the code, or all the 'commands' I need to use. Playing with it I was only able to get it to report sub categories and top level together.

THANKS IN ADVANCE!

19 Aug 2010, 5:44 AM
#5
knockoutcomputers avatar

knockoutcomputers

New Zenner

Join Date:
Feb 2010
Posts:
7
Plugin Contributions:
0

Re: I want to make a dynamic drop-down menu for TOP LEVEL categories

This will work, THANKS!

19 Aug 2010, 11:33 PM
#6
amandagero avatar

amandagero

Zen Follower

Join Date:
Feb 2009
Posts:
188
Plugin Contributions:
0

Re: I want to make a dynamic drop-down menu for TOP LEVEL categories

no problem, glad to help.