cfmenu

Creates a menu or tool bar (a horizontally arranged menu). Any menu item can be the top
level of a submenu.

  <cfmenu>

 cfmenu();

The cfmenu tag is DEPRECATED as of ColdFusion 2016

Discouraged: The use of tags generating UI is generally discouraged by the CFML community. See: https://static.raymondcamden.com/cfuitherightway/cfmenu/index.html

Attribute Reference

bgcolor string

The color of the menu background. You can
use any valid HTML color specification.
This specification is locally overridden by the
menuStyle attribute of this tag and any
cfmenuitem tag, but does affect the background
of the surrounding color of a submenu whose
background is controlled by a childStyle
attribute

childstyle string

A CSS style specification that applies to the
items of the top level menu and all child menu
items, including the children of submenus. This
attribute lets you use a single style specification
for all menu items.

font string

The font to be use for all child menu items. You
can use any valid HTML font-family style
attribute.

fontcolor string

The color of the menu text. You can use any
valid HTML color specification.

fontsize string

The size of the font. Use a numeric value, such
as 8, to specify a pixel character size. Use a
percentage value, such as 80% to specify a
size relative to the default font size.
Font sizes over 20 pixels can result in submenu
text exceeding the menu boundary.

menustyle string

A CSS style specification that applies to the
menu, including any parts of the menu that do not
have items. If you do not specify style information
in the cfmenuitem tags, this attribute controls the
style of the top-level items.

name string

The name of the menu.

selectedfontcolor string

The color of the text for the menu item that has
the focus. You can use any valid HTML color
specification.

selecteditemcolor string

The color that highlights the menu item that has
the focus. You can use any valid HTML color
specification.

type string
Default: horizontal

The orientation of menu.
Values:
  • horizontal
  • vertical

width string

The width of a vertical menu; not valid for
horizontal menus.

Compatibility

ColdFusion:

DEPRECATED since version 2016

Examples
Sample code using the cfmenu tag

The example about simple menu with menuItems.It is supported in cf 10,11 & 16.

<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"/>
</cfmenu>

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub