Jump to content

building a menu and its submenus (recursion!)


hassank1

Recommended Posts

Hi..

I want to create a menu using the menu from this link :

 

http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_horizontal_blue/

 

if the menu items are well known that's easy.

 

however I want to build a menu and its submenus (could be many submenu levels..) where I get data from the database..

 

here's my table structure and an example of the data presentation

 

MenuID - name -      Link - ParentID

 

1          item1 ex0.com 0  <-- root menu

2          item2 ex1.com             0  <-- root menu

3          item3 ex2.com             1  <-- submenu of 1

4          item4 ex3.com             1  <-- submenu of 1

5          item5 ex4.com             2  <-- submenu of 2

6          item6 ex4.com             5  <-- submeny of 5

etc

.

.

.

 

I need help in implementing the code that will use the above method of creating menus

 

(http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_horizontal_blue/). but with the items selected from the

 

table.

 

I appreciate any help..

 

thank you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.