menu_id int(11)
menu_name varchar(50)
parent_id int(11)
Here is some possible data
Code: Select all
Menu id Name Parent id
1 Yahoo 0
2 Yahoo Sports 1
So anything with a parent_id of 0, would be at the main menu level and here, Yahoo Sports would be a submenu of the Yahoo menu.
What if I didn't know the depth of the menus? Meaning, what if someone were to add a sub menu of Baseball to the Yahoo Sports menu item? Is there a way I can write the menu code to dynamically generate the menu based on the parent id's?
In your examples online, you provide this syntax:
Code: Select all
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=220;
left=180;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://milonic.com/;status=Back To Home Page;");
aI("text=Menu Samples;showmenu=Samples;");
aI("text=Milonic;showmenu=Milonic;");
aI("text=Partners;showmenu=Partners;");
aI("text=Links;showmenu=Links;");
aI("text=My Milonic;showmenu=MyMilonic;");
}
Code: Select all
with(milonic=new menuname("Samples")){
style=menuStyle;
overflow="scroll";
......etc.
Code: Select all
Code: Select all