Is is possible to add links to alreadying existing menus and then redraw them? For example here's my initial menu...
with(MyMenu=new menuname("Main Menu")){
style=menuStyle0;
menuwidth=141;
itemwidth=141;
alwaysvisible=1;
orientation="vertical";
position="relative";
aI("text= Links;showmenu=Links;");
aI("type=header;separatorsize=1;separatorpadding=5"); // separator
}
After doing this is there any way to add another aI() to the menu? Like this...
with(menuname["Main Menu"]){
aI("text=Added Later;url=http://www.bannerhealth.com/;");
}
I'm rebuilding the menu into a .net component for our intranet and I need to be able to write in different parts of a menu at different times in the code.
Any suggestions would be much appreciated.
Thanks.
Add to existing menus? V5
SOLUTION: Add to existing menus? V5
Yah! I figured it out. Here's how you do it...
----------------------------------------------------------------
var MyMenu=new menuname("Main Menu");
with(MyMenu){
style=menuStyle0;
menuwidth=141;
itemwidth=141;
alwaysvisible=1;
orientation="vertical";
position="relative";
aI("text= Links;showmenu=Links;");
aI("type=header;separatorsize=1;separatorpadding=5"); // separator
}
----------------------------------------------------------------
Then somewhere later in my code...
----------------------------------------------------------------
with(MyMenu){
aI("text=Added Later;url=http://milonic.com/;");
}
----------------------------------------------------------------
You have to add to the menu before doing drawMenus().
Later all.
----------------------------------------------------------------
var MyMenu=new menuname("Main Menu");
with(MyMenu){
style=menuStyle0;
menuwidth=141;
itemwidth=141;
alwaysvisible=1;
orientation="vertical";
position="relative";
aI("text= Links;showmenu=Links;");
aI("type=header;separatorsize=1;separatorpadding=5"); // separator
}
----------------------------------------------------------------
Then somewhere later in my code...
----------------------------------------------------------------
with(MyMenu){
aI("text=Added Later;url=http://milonic.com/;");
}
----------------------------------------------------------------
You have to add to the menu before doing drawMenus().
Later all.