Cold Fusion Tag for dhtmlXMenu

This chapter also included into main documentation for dhtmlXMenu. <cf_dhtmlXMenu name="tree" width="250" height="250" mode="classic" type="A2" title="Demo menu" align="left" JSPath="../" CSSPath="../" xmlFile="tree.xml" style="background-color:whitesmoke;border:1px solid blue;" onSelect="onNodeSelect"> ...configuration xml... </cf_dhtmlXMenu>
  • name - [optional] name of the tree js object to use in javascript, if skiped, then name autogenerated
  • width - [optional] width of the menu
  • height - [optional] height of the menu
  • mode - [optional] set horisontal ("classic") or vertical ("popup") orientation of menu ( horisontal orientation is default ), also can set some additional modes, which shown in "Vertical design" example.
  • type - [optional] set menu item design (for more details see chapter "Configuring with XML" in guide, default type is "A2").
  • withoutImages - [optional] force menu item without images on top level
  • mixedImages - [optional] allow menu items with images and without images on top level.
  • title - [optional] title of menu
  • align - [optional] align of menu buttons (left,right,center for horisontal menu, top,bottom,middle for vertical menu)
  • JSPath - [optional] absolute or relative path to directory which contains tree js files, "js" directory by default
  • CSSPath - [optional] absolute or relative path to directory which contains tree css files, "css" directory by default
  • xmlFile - [optional] url of the configuration xml file
  • style - [optional] style for the menu box
  • onSelect - [optional] javascript function to call on button selection
  • context - [optional] create menu as context menu. For more detail on context menu look "dhtmlXContextMenu tag help"

  • For description of optional configuration xml - see chapter "Configuring with XML"

    Minimal possible tag syntax with on-page xml: <cf_dhtmlXMenu> <MenuItem name="File" src="programs.gif" id="main_file" width="30" /> </cf_dhtmlXMenu> Minimal possible tag syntax with server-side xml: <cf_dhtmlXMenu xmlFile="menu.xml"> </cf_dhtmlXMenu> With common used attributes <cf_dhtmlXMenu name="aMenu" jsPath="../js/" cssPath="../css/" iconsPath="../img/" title="Demo Menu" onSelect="jsOnClick" height="25px"> <MenuItem name="File" src="programs.gif" id="main_file" width="30" > <MenuItem name="New" id="new"/> <MenuItem name="Open" id="open"/> <MenuItem name="Edit with Notepad" id="edit_with"/> <MenuItem name="Save As..." id="save"/> <divider id="div_1"/> <MenuItem name="Page Setup..." id="page"/> <MenuItem name="Print..." id="print"/> <MenuItem name="Print Preview..." id="preview"/> <divider id="div_2"/> <MenuItem name="Close" id="close"/> </MenuItem> </cf_dhtmlXMenu> Vertical designed menu <cf_dhtmlXMenu jsPath="../js/" cssPath="../css/" iconsPath="../img/" mode="popup" width="120px" mixedImages=""> <MenuItem name="File" src="programs.gif" id="main_file" width="30" > <MenuItem name="New" id="new"/> <MenuItem name="Open" id="open"/> <MenuItem name="Edit with Notepad" id="edit_with"/> <MenuItem name="Save As..." id="save"/> <divider id="div_1"/> <MenuItem name="Page Setup..." id="page"/> <MenuItem name="Print..." id="print"/> <MenuItem name="Print Preview..." id="preview"/> </MenuItem> <MenuItem name="Close" id="close" width="30"> <MenuItem name="Close" id="close2" width="30" /> </MenuItem> </cf_dhtmlXMenu>