Newbie needs help with Database driven menus in Coldfusion

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
CFHam
Beginner
Beginner
Posts: 2
Joined: Mon Oct 04, 2004 2:06 pm

Newbie needs help with Database driven menus in Coldfusion

Post by CFHam »

I'm looking for examples on how to generate database driven menus in Cold Fusion. Any help would be greatly appreciated.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

First thing to do is upgrade. The v3 menu is no longer supported or developed. v5.48 is available at http://milonic.com/. Come back when you're set and we'll go from there.
John
CFHam
Beginner
Beginner
Posts: 2
Joined: Mon Oct 04, 2004 2:06 pm

Post by CFHam »

Thanks for the Reply John, I downloaded the new version V5.48.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Good. Make sure you read the included docs, as many things are different in the v5 system.

As for CF, just change the name of menu_data.js to menu_data.cfm and pop your code in. Follow all the Milonic "rules" for normal menu building - styles, aI statements, etc. Just because it now says .cfm nothing changes except for the CF stuff you add. Here's a very simple example I did on one of my pages...

Code: Select all

with(milonic=new menuname("system")){	
style=XPMenuStyle;
borderwidth=1;
orientation="vertical";
aI("text=Browser: <cfoutput>#cgi.http_user_agent#</cfoutput>;image=/sai/graphics/xpblank.gif;");
aI("text=Code Name: "+navigator.appCodeName+";image=/sai/graphics/xpblank.gif;");
aI("text=Color Depth: "+screen.colorDepth+" bit;image=/sai/graphics/xpblank.gif;");
aI("text=IP: <cfoutput>#cgi.remote_addr#</cfoutput>;image=/sai/graphics/xpblank.gif;");
aI("text=Language: "+navigator.browserLanguage+";image=/sai/graphics/xpblank.gif;");
aI("text=Platform: "+navigator.platform+";image=/sai/graphics/xpblank.gif;");
aI("text=Screen Max: "+screen.availWidth+"  x  "+screen.availHeight+";image=/sai/graphics/xpblank.gif;");
aI("text=Screen Resolution: "+screen.width+"  x  "+screen.height+";image=/sai/graphics/xpblank.gif;");
}
You can see what this returns at http://westcgi.west.asu.edu/sai/, Tech./System Info.
John
Post Reply