Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:47
Keeping highlight when subpage isn't 'in' menu [SOLVED]
Poster: imattjc
Dated: Friday December 8 2006 - 19:19:20 GMT
I have this problem. I have 3rd and 4th level pages and we want to have the menu highlighted for them. But these are not listed in the menu itself, and it appears that the highlighting is not working. This can be seen at:
http://ip.integreat-dev.com/news/Press-Releases.php - this is the second level page and works correctly. News is Gray.
http://ip.integreat-dev.com/news/sample ... elease.php - this is the third level page and News is not Gray.
Here are how I am calling the menus:
Code:
with(milonic=new menuname("MainMenu")){
alwaysvisible=1;
left=0;
orientation="horizontal";
style=menuStyle;
top=73;
aI("offfunction=on();onfunction=off();image=/img/sep2.gif;overimage=/img/sep.gif;padding=0;itemwidth=3;imagealign=center;type=header;");
aI("offfunction=on();onfunction=off();image=/img/learn.gif;overimage=/img/learn_hi.gif;showmenu=Learn;url=/know/");
aI("offfunction=on();onfunction=off();image=/img/understand.gif;overimage=/img/understand_hi.gif;showmenu=Understand;url=/understand/");
aI("offfunction=on();onfunction=off();image=/img/fix.gif;overimage=/img/fix_hi.gif;showmenu=Fix;url=/fix/;");
}
drawMenus();
alwaysvisible=1;
left=0;
orientation="horizontal";
style=menuStyle;
top=73;
aI("offfunction=on();onfunction=off();image=/img/sep2.gif;overimage=/img/sep.gif;padding=0;itemwidth=3;imagealign=center;type=header;");
aI("offfunction=on();onfunction=off();image=/img/learn.gif;overimage=/img/learn_hi.gif;showmenu=Learn;url=/know/");
aI("offfunction=on();onfunction=off();image=/img/understand.gif;overimage=/img/understand_hi.gif;showmenu=Understand;url=/understand/");
aI("offfunction=on();onfunction=off();image=/img/fix.gif;overimage=/img/fix_hi.gif;showmenu=Fix;url=/fix/;");
}
drawMenus();
Code:
fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=100;
_menuOpenDelay=150;
with(menuStyle4=new mm_style()){
bordercolor="#CC9900";
borderstyle="solid";
borderwidth=4;
fontfamily="Arial, Verdana, Tahoma";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#CC9900";
headercolor="#CC9900";
offbgcolor="#CC9900";
offcolor="#CC9900";
onbgcolor="#CC9900";
oncolor="#CC9900";
padding=5;
pagebgcolor="#CC9900";
pagecolor="#666666";
}
with(menuStyle3=new mm_style()){
bordercolor="#CC9900";
borderstyle="solid";
borderwidth=4;
fontfamily="Arial, Verdana, Tahoma";
fontsize="85%";
fontstyle="normal";
headerbgcolor="#CC9900";
headercolor="#000000";
offbgcolor="#CC9900";
offcolor="#FFFFFF";
onbgcolor="#CC9900";
oncolor="#666666";
padding=4;
pagebgcolor="#CC9900";
pagecolor="#666666";
separatorcolor="#CC9900";
separatorsize=1;
}
with(milonic=new menuname("About")){
style=menuStyle3;
left="offset=-3";
aI("offfunction=on();onfunction=off();text=MISSION STATEMENT;url=/about/Mission-Statement.php;");
aI("offfunction=on();onfunction=off();text=FAQs;url=/about/FAQs.php;");
aI("offfunction=on();onfunction=off();text=BOARD OF DIRECTORS;url=/about/Board-of-Directors.php;");
aI("offfunction=on();onfunction=off();text=STAFF DIRECTORY;url=/about/Staff-Directory.php;");
aI("offfunction=on();onfunction=off();text=OPPORTUNITIES;url=/about/Opportunities.php;");
aI("offfunction=on();onfunction=off();text=CONTACT US;url=/about/Contact-Us.php;");
}
with(milonic=new menuname("Donate")){
style=menuStyle3;
left="offset=-3";
aI("offfunction=on();onfunction=off();text=CAPITAL CAMPAIGN;url=/donate/Capital-Campaign.php;");
aI("offfunction=on();onfunction=off();text=DONATE;url=/donate/Donate.php;");
}
with(milonic=new menuname("News")){
style=menuStyle3;
left="offset=-3";
aI("offfunction=on();onfunction=off();text=IP BLOG;url=/news/Blog.php;");
aI("offfunction=on();onfunction=off();text=PRESS RELEASES;url=/news/Press-Releases.php;");
aI("offfunction=on();onfunction=off();text=OTHER LEGAL INFORMATION;url=/news/Other-Legal-Information.php;");
aI("offfunction=on();onfunction=off();text=FACT SHEETS;url=/news/Fact-Sheets.php;");
aI("offfunction=on();onfunction=off();text=NATIONAL VIEW;url=/news/National-View.php;");
}
drawMenus();
_menuCloseDelay=100;
_menuOpenDelay=150;
with(menuStyle4=new mm_style()){
bordercolor="#CC9900";
borderstyle="solid";
borderwidth=4;
fontfamily="Arial, Verdana, Tahoma";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#CC9900";
headercolor="#CC9900";
offbgcolor="#CC9900";
offcolor="#CC9900";
onbgcolor="#CC9900";
oncolor="#CC9900";
padding=5;
pagebgcolor="#CC9900";
pagecolor="#666666";
}
with(menuStyle3=new mm_style()){
bordercolor="#CC9900";
borderstyle="solid";
borderwidth=4;
fontfamily="Arial, Verdana, Tahoma";
fontsize="85%";
fontstyle="normal";
headerbgcolor="#CC9900";
headercolor="#000000";
offbgcolor="#CC9900";
offcolor="#FFFFFF";
onbgcolor="#CC9900";
oncolor="#666666";
padding=4;
pagebgcolor="#CC9900";
pagecolor="#666666";
separatorcolor="#CC9900";
separatorsize=1;
}
with(milonic=new menuname("About")){
style=menuStyle3;
left="offset=-3";
aI("offfunction=on();onfunction=off();text=MISSION STATEMENT;url=/about/Mission-Statement.php;");
aI("offfunction=on();onfunction=off();text=FAQs;url=/about/FAQs.php;");
aI("offfunction=on();onfunction=off();text=BOARD OF DIRECTORS;url=/about/Board-of-Directors.php;");
aI("offfunction=on();onfunction=off();text=STAFF DIRECTORY;url=/about/Staff-Directory.php;");
aI("offfunction=on();onfunction=off();text=OPPORTUNITIES;url=/about/Opportunities.php;");
aI("offfunction=on();onfunction=off();text=CONTACT US;url=/about/Contact-Us.php;");
}
with(milonic=new menuname("Donate")){
style=menuStyle3;
left="offset=-3";
aI("offfunction=on();onfunction=off();text=CAPITAL CAMPAIGN;url=/donate/Capital-Campaign.php;");
aI("offfunction=on();onfunction=off();text=DONATE;url=/donate/Donate.php;");
}
with(milonic=new menuname("News")){
style=menuStyle3;
left="offset=-3";
aI("offfunction=on();onfunction=off();text=IP BLOG;url=/news/Blog.php;");
aI("offfunction=on();onfunction=off();text=PRESS RELEASES;url=/news/Press-Releases.php;");
aI("offfunction=on();onfunction=off();text=OTHER LEGAL INFORMATION;url=/news/Other-Legal-Information.php;");
aI("offfunction=on();onfunction=off();text=FACT SHEETS;url=/news/Fact-Sheets.php;");
aI("offfunction=on();onfunction=off();text=NATIONAL VIEW;url=/news/National-View.php;");
}
drawMenus();
Any help would be greatly appreciated....
Poster: Ruth
Dated: Friday December 8 2006 - 22:37:12 GMT
Hi,
You can set up page 'matching' using folders. This means that any page in a folder which has a pagematch assigned will highlight the menu even if it's not in the menu.
Using the page you put up, make your aI string for the news and information the following:
Code:
aI("offfunction=on();onfunction=off();image=/img/news2.gif;overimage=/img/news2_hi.gif;showmenu=News;url=/news/;pageimage=/img/news2_hi.gif;pagematch=/news/");
This should mean that even if you click a link on the main news page, if the page is in that news folder the menu should continue to match, actually any page that is in the news folder should keep the match.
Ruth
Thanks!!
Poster: imattjc
Dated: Friday December 8 2006 - 23:57:27 GMT
Thanks Ruth. Once again, you've saved me.