ColdFusion 9.0 Resources |
cfmenuDescriptionCreates a horizontal or vertical menu. Any menu item can be the top level of a submenu. CategorySyntax<cfmenu bgcolor="HTML color value" childStyle="CSS style specification" font="HTML font family" fontColor="HTML color value" fontSize="Number of pixels" menuStyle="CSS style specification" name="string" selectedFontColor="HTML color value" selectedItemColor="HTML color value" type="horizontal|vertical width="Number of pixels"> cfmenuitem tags </cfmenu> The cfmenu tag must have a body that contains at least one cfmenuitem tag to define the menu items and an end </cfmenu> tag. Note: You can specify this tag’s attribute in an attributeCollection attribute whose
value is a structure. Specify the structure name in the attributeCollection attribute
and use the tag’s attribute name as structure key.
See alsocfajaximport, cfmenuitem, Using menus and toolbars in Using Ajax User Interface Components and Features in the Developing ColdFusion Applications HistoryColdFusion 8: Added this tag. Attributes
UsageThe cfmenu tag defines a horizontal or vertical ColdFusion menu. You use a single cfmenu tag to define the general menu characteristics, and you use cfmenuitem child tags to define the individual menu entries and any submenus. You create submenus by putting cfmenuitem tags in the body of a cfmenuitem tag. You cannot nest a cfmenu tag inside a form or inside a cfmenu tag or cfmenuitem tag. ExampleThe following example creates a simple menu bar. When you click an entry in the bar, the browser displays the Adobe website page for the selected product. You can expand the ColdFusion item by clicking the icon, and then select an item to display a specific ColdFusion web page. <html xmlns="http://www.w3.org/1999/xhtml"> <head> </head> <body> <cfmenu name="menu" type="horizontal" fontsize="14" bgcolor="##CCFFFF"> <cfmenuitem name="acrobat" href="http://www.adobe.com/acrobat" display="Acrobat"/> <cfmenuitem name="aftereffects" href="http://www.adobe.com/aftereffects" display="After Effects"/> <!--- The ColdFusion menu item has a pop-up menu. ---> <cfmenuitem name="coldfusion" href="http://www.adobe.com/products/coldfusion" display="ColdFusion"> <cfmenuitem name="buy" href="http://www.adobe.com/products/coldfusion/buy/" display="Buy"/> <cfmenuitem name="devcenter" href="http://www.adobe.com/devnet/coldfusion/" display="Developer Center"/> <cfmenuitem name="documentation" href="http://www.adobe.com/support/documentation/en/coldfusion/" display="Documentation"/> <cfmenuitem name="support" href="http://www.adobe.com/support/coldfusion/" display="Support"/> </cfmenuitem> <cfmenuitem name="flex" href="http://www.adobe.com/flex" display="Flex"/> </cfmenu> </body> </html> |