So, for example, in my Main Menu, I have a menu item called 'Barbara', which has a child menu called 'Barbara1', which has another child called 'Barbara2'. If the user is on the Barbara2 page, we want to see a different background color for all THREE menu items, i.e. Barbara, Barbara1 and Barbara2.
Here is my code:
Code: Select all
fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=0;
_subOffsetLeft=0;
buildAfterLoad=true;
with(menuStyle=new mm_style()){
fontfamily='Lucida Sans Unicode','Lucida Grande','Lucida Sans','Tahoma',"Arial","Verdana";
fontsize="100%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#fff";
menubgimage="http://localhost:8080/roostMortgage-theme/images/navigation/bg.png";
offbgcolor="transparent";
offcolor="#fff";
onbgcolor="black";
oncolor="#fff";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=5)";
padding=5;
pagebgcolor="#AF1E2D";
pagecolor="#fff";
}
with(menuDropStyle=new mm_style()){
fontfamily='Lucida Sans Unicode','Lucida Grande','Lucida Sans','Tahoma',"Arial","Verdana";
fontsize="100%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#fff";
offbgcolor="#c5c6c2";
offcolor="#fff";
onbgcolor="black";
oncolor="#fff";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=100);Shadow(color=#777777', Direction=135, Strength=3)";
padding=5;
pagebgcolor="#AF1E2D";
pagecolor="#fff";
}
with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
position="relative";
orientation="horizontal";
style=menuStyle;
menuwidth=800;
menuheight=25;
aI("showmenu=Barbara;text=Barbara;url=/web/guest/25;regexmatch=^(/web/guest/25)$;");
}
with(milonic=new menuname("Barbara")){
overflow="scroll";
style=menuDropStyle;
aI("showmenu=Barbara1;text=Barbara1;url=/web/guest/26;regexmatch=^(/web/guest/25|/web/guest/26)$;");
}
with(milonic=new menuname("Barbara1")){
overflow="scroll";
style=menuDropStyle;
aI("text=Barbara2;url=/web/guest/27;regexmatch=^(/web/guest/25|/web/guest/26|/web/guest/27)$;");
}
drawMenus();
^(/web/guest/25|/web/guest/26|/web/guest/27)$
should match pages 25, 26 and 27 (aka Barbara, Barbara1 and Barbara2), but only page Barbara2 has the desired background color.
I'm using (a licensed) Version 5.803.