Newbie needs help with Database driven menus in Coldfusion
Newbie needs help with Database driven menus in Coldfusion
I'm looking for examples on how to generate database driven menus in Cold Fusion. Any help would be greatly appreciated.
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
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...
You can see what this returns at http://westcgi.west.asu.edu/sai/, Tech./System Info.
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;");
}
John