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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.