I am pretty excited about the new CFMenu functionality. It's by far the easiest interface I've used to create a DHTML/JavaScript/CSS menu. Basically there are two tags, <cfmenu> sets up the basic settings for the menu and <cfmenuitem> us used to build the menu items structure.

You can nest as many <cfmenuitem> levels as you want, however, once you get past 5 levels deep, you start to get noticeably slow page loads. Once you get past 10 levels,

you will notice that after the really slow page load, when you navigate the levels, it takes a long time to open each of the menu branches. I went as far as twenty levels deep, and it worked, but it locked my browser for about a minute or so before it loaded, and then it locked again when I tried to navigate the menu. For best results, I would suggest you keep your menu within 5 levels deep.

You can customize the fonts, colors, and highlight effects of the menu using the <cfmenu> tag. One small glitch I noticed is that if you don't use the default selected item background color, then when you navigate the menu in Internet Explorer, it flickers with the default baby blue before it changes to the color you selected. I have reported this browser compatibility issue to Adobe (bug #70452), so hopefully there will be a hot fix for that sometime soon.

In the mean time, on my development server, I was able to get rid of the blue part of the flicker by editing the /CFIDE/scripts/ajax/resources/yui/yui.css file and removing the default background color. Of course, it still flickers a little, but at least there is no more blue in the flicker. The main draw back is that if you do that, there is not a default background color so you will always have to specify a color in the selecteditemcolor attribute, which I would have done anyways because I don't like the default blue so it works out fine for me.

One other thing I noticed is that the cfmenu tag does not play well with <cflayout type="border"> unless you only have one level of menu options.

I tried a vertical menu on the "left" cflayoutarea (click here and expand the menu)

<cfoutput>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>
<head>
   <title>CFMenu with CFLayout</title>
</head>
<body>
<cflayout type="border">
   
   <cflayoutarea position="left" name="LeftNav">
      <table cellpadding="5">
      <tr>
         <td align="center">Administration Console</td>
      </tr>
      </table>
      <cfmenu type="VERTICAL"
         menustyle="font-weight: bold;"
         childstyle="font-weight: bold;"
         bgcolor="##000000"
         fontcolor="##ffffff"
         selecteditemcolor="##DDDDDD"
         selectedfontcolor="##000000">

         
         <cfmenuitem display="Page Content">
            <cfmenuitem display="Home"/>
            <cfmenuitem display="About Us"/>
            <cfmenuitem display="Contact Us"/>
         </cfmenuitem>
         <cfmenuitem display="Products"/>
         <cfmenuitem display="Categories"/>
         <cfmenuitem display="Shop Locations"/>
      
      </cfmenu>
   </cflayoutarea>
   
   <cflayoutarea position="center" name="main">
   <br><br>This is where all the content would be displayed if this were not just a sample
    and I actually wanted to go through the trouble to make it work.
   </cflayoutarea>
   
</cflayout>
</body>
</html>
</cfoutput>

And I also tried a horizontal top menu (click here and expand the menu)

<cfoutput><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>
<head>
   <title>CFMenu with CFLayout</title>
</head>
<body>
<cflayout type="border">
   
   <cflayoutarea position="top" name="TopNav">
      <table cellpadding="5">
      <tr>
         <td align="center">Administration Console</td>
         <td>
         <cfmenu type="HORIZONTAL"
            menustyle="font-weight: bold;"
            childstyle="font-weight: bold;"
            bgcolor="##000000"
            fontcolor="##ffffff"
            selecteditemcolor="##DDDDDD"
            selectedfontcolor="##000000">

            
            <cfmenuitem display="Page Content">
               <cfmenuitem display="Home"/>
               <cfmenuitem display="About Us"/>
               <cfmenuitem display="Contact Us"/>
            </cfmenuitem>
            <cfmenuitem display="Products"/>
            <cfmenuitem display="Categories"/>
            <cfmenuitem display="Shop Locations"/>
            
         </cfmenu>
         </td>
      </tr>
      </table>
      
   </cflayoutarea>
   
   <cflayoutarea position="center" name="main">
   <br><br>This is where all the content would be displayed if this were not just a sample
    and I actually wanted to go through the trouble to make it work.
   </cflayoutarea>
   
</cflayout>
</body>
</html>
</cfoutput>

either way the cfmenu does not expand outside of the cflayoutarea it is in, so you would have to just use a regular table for the layout and the you could put your dynamic content into a cfdiv like:

<cfoutput>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>
<head>
   <title>CFMenu with CFDiv</title>
</head>
<body>
<table height="500">
   <tr>
      <td height="50" align="center">Administration Console</td>
      <td rowspan="2" width="1" bgcolor="808080"></td>
      <td rowspan="2" valign="top">
         <cfdiv id="MainDiv">This is where all the content would be displayed if this were not just a sample
          and I actually wanted to go through the trouble to make it work. I would have my cfmenu items use
          ColdFusion.Navigate() on my menu items to change the content in the div.</cfdiv>
      </td>
   </tr>
   <tr>
      <td height="450" valign="top">
         <cfmenu type="VERTICAL"
            menustyle="font-weight: bold;"
            childstyle="font-weight: bold;"
            bgcolor="##000000"
            fontcolor="##ffffff"
            selecteditemcolor="##DDDDDD"
            selectedfontcolor="##000000">

            
            <cfmenuitem display="Page Content">
               <cfmenuitem display="Home"/>
               <cfmenuitem display="About Us"/>
               <cfmenuitem display="Contact Us"/>
            </cfmenuitem>
            <cfmenuitem display="Products"/>
            <cfmenuitem display="Categories"/>
            <cfmenuitem display="Shop Locations"/>
            
         </cfmenu>
      </td>
   </tr>
</table>
</body>
</html>
</cfoutput>

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Jim's Gravatar I found that if you put the tag in a CFDiv tag the lower level menus do not fly out.
# Posted By Jim | 11/13/07 9:27 AM
Dan Sorensen's Gravatar Have you had any problems with the CF Menu not working in any browsers? On my laptop running Firefox the menu flickers and I see a message that says "Collapsed Click to Expand" (Not your example, my own test of this nifty feature. It works great in IE 6. I wonder what I could be doing wrong...)
# Posted By Dan Sorensen | 11/13/07 5:40 PM
Dan Sorensen's Gravatar Got it working. :-) Needed to replace my CFIDE folder with a current version. (I still had the Scorpio Beta on my laptop. Oops...)

Thanks for this overview. It works great now. :-)
# Posted By Dan Sorensen | 11/13/07 6:47 PM
Scott Bennett's Gravatar Glad you got it working. You definitely need your CFIDE directory working properly as of CF8. In fact, I am going to make an entry about that right now.
# Posted By Scott Bennett | 11/13/07 6:53 PM
gdemaria's Gravatar Hey Scott,
CFMENU when initially launched seems to open with a broken (unformatted) display and then "snaps" together when the page is completely loaded. This is similar to the CFWINDOW problem
where initially hidden pop-up windows have their names display on the page and then disappear after the page is fully loaded.

I'm wondering if you are experiencing this and if you may know of a work-around.
Thanks!
# Posted By gdemaria | 2/6/08 1:41 PM
Scott Bennett's Gravatar @gdemaria,

I have seen that with both cfwindow and cfmenu and I believe it has mostly to do with the order in which the browser is loading the style sheets and javascript, and more specifically, the time it takes between loading the page HTML and loading then applying the style sheets and javascript.

Off the top of my head, the best (untested) workaround I can think of is to create a div layer around your cfwindow/cfmenu tag that is set to display:none then use cfajaxonload to call a javascript function that changes that div layer so that that it is visible. This should hide the contents of your window and menu until after the css and javascript has been applied and the window/menu will all appear at once.
# Posted By Scott Bennett | 2/6/08 3:50 PM
pioslomc's Gravatar Hi Scott,

When I am using AJAX components I have sometime some problem with them.
The same with your example about menu (is not properly showed in browser). when I am checking Validation (in my Dreaweaver8) I have errors like:
"The tag name "cfmenu" not found in currently active versions.
When I am checking TargetBrowserCheck (Dreamweaver8) I have errors like:
"The cfmenu is not supported (names of browsers)".
The same problem I have with cfajaximport, then my browser give me an additional message about unknown runtime error
I wil be preciate if you help me.
# Posted By pioslomc | 9/12/08 5:58 AM
Andrew's Gravatar Is there a way with cfmenu to get the clicked on menu item to stay highlighed so the user can see what page they are on?

Eg I have a cfmenu with a "home" as a menu item, when the user clicks on this menu item it takes you to that link within the current site and I would like the home menu item to be highighted so it's easy for the user to see what page they are on.
# Posted By Andrew | 1/27/09 12:14 AM
Yosu's Gravatar I am testing the cfmenu tag with Cold Fusion 9 on Windows -
I noticed that there are specific things that disable the menu
functionality, such as clicking the Back button on IE. (meaning
that I no longer get the down arrow, and I can't click the link)
Is there something that I have to do, to force the page to reload?
Thank you.
# Posted By Yosu | 11/25/09 6:13 PM
https://www.bababorses.de/Louis-Vuitton-Damier-Ebene-Canvas-Clapton-PM-Bag-N44243-Magnolia-2361-it.html https://www.bababorses.de/Louis-Vuitton-LV-Trainer-Men-s-Sneakers-Top-Quality-15-5322-it.html https://www.bababorses.de/Celine-Small-Cabas-Bag-In-Black-Leather-it-2087 https://www.bababorses.de/Louis-Vuitton-Heel-10cm-Call-Back-Sandals-Nude-6162-it.html https://www.bababorses.de/LOUIS-VUITTON-BREA-MM-Monogram-Vernis-Leather-In-Magenta-4069-it.html https://www.bababorses.de/Louis-Vuitton-Ring-09-557-it.html https://www.bababorses.de/Louis-Vuitton-Monogram-LV-Square-Espadrilles-Slipper-Sandals-Brown-6371-it.html https://www.bababorses.de/Prada-Golden-Saffiano-Calfskin-Leather-Top-Handle-Bag-it-2956 https://www.bababorses.de/Dior-Diorissimo-Small-Bag-Black-Nappa-Leather-Silvery-Hardware-8001-it-22 https://www.bababorses.de/Louis-Vuitton-Idylle-Blossom-Charms-Necklace-Q94360-406-it.html https://www.bababorses.de/Louis-Vuitton-Color-Blossom-BB-Star-Pendant-Necklace-Red-Gold-309-it.html https://www.bababorses.de/Bvlgari-Serpenti-Original-Leather-Framed-Pochette-Sky-Blue-82121-it-1938 https://www.bababorses.de/Louis-Vuitton-Horizon-55-Trolley-Travel-Luggage-Bag-Taiga-Leather-M30331-Red-6892-it.html https://www.bababorses.de/Fendi-By-The-Way-Small-Croc-Satchel-White-it-2731 https://www.bababorses.de/Louis-Vuitton-Monogram-Canvas-and-PVC-Nano-Bag-M61114-3176-it.html https://www.bababorses.de/Louis-Vuitton-Sarah-Multicartes-Wallet-M61273-Hot-Pink-7624-it.html https://www.bababorses.de/louis-vuitton-speedy-30--Damier-Azur-Canvas-n44367-2300-it.html https://www.bababorses.de/Hermes-Birkin-35cm-cattle-skin-vein-Handbags-blue-golden-it-907 https://www.bababorses.de/Saint-Laurent-Baby-Sac-De-Jour-Bag-In-Rose-Grained-Leather-it-3322 https://www.bababorses.de/Louis-Vuitton-Twist-MM-M53531-M53532-2775-it.html https://www.bababorses.de/Louis-Vuitton-Sunglasses-133-978-it.html https://www.bababorses.de/Louis-Vuitton-Neverfull-MM-M54185-Black-2705-it.html https://www.bababorses.de/Prada-Saffiano-East-West-Medium-Tote-Bag-Nero-it-3042 https://www.bababorses.de/Louis-Vuitton-Compact-Wallet-in-Monogram-Canvas-M63041-7399-it.html https://www.bababorses.de/Prada-Mens-Leather-Pouch-3312-Black-it-3099 https://www.bababorses.de/Louis-Vuitton-Women-s-Escale-Lock-It-Flat-Mule-1A7TOX-Pink-5965-it.html https://www.bababorses.de/Fendi-Baguette-Micro-Monster-Bag-Purple-Multi-it-533 https://www.bababorses.de/Louis-Vuitton-LV-Angel-Stud-Earrings-M64293-435-it.html https://www.bababorses.de/Louis-Vuitton-Damier-Ebene-Canvas-Zippy-Wallet-Evasion-M61360-7219-it.html https://www.bababorses.de/LOUIS-VUITTON-CATOGRAM-SQUARE-SCARF-MP2266-4818-it.html https://www.bababorses.de/Louis-Vuitton-Monogram-Empreinte-Triangle-Shaped-Messenger-Bag-M54330-Black-3865-it.html https://www.bababorses.de/Balenciaga-Velo-Anthracite-store-it-1723 https://www.bababorses.de/Chloe-Marcie-Medium-Satchel-Bag-Cobalt-it-2283 https://www.bababorses.de/louis-vuitton-epi-leather-Soufflot-BB-bag-m55613-black-2580-it.html https://www.bababorses.de/Louis-Vuitton-Dauphine-MM-M55735-4512-it.html https://www.bababorses.de/Louis-Vuitton-Crafty-NeoNoe-MM-bag-black-M45497-2980-it.html https://www.bababorses.de/Louis-Vuitton-Men-Box-Bag-Shoulder-Body-Bag-M44157-Brown-3136-it.html https://www.bababorses.de/Prada-Saffiano-Double-Zip-Executive-Tote-Bag-Gray-it-3025 https://www.bababorses.de/Louis-Vuitton-Epi-Leather-NeoNoe-BB-Bucket-Bag-M53610-Indigo-2564-it.html https://www.bababorses.de/Saint-Laurent-Small-Monogram-Tassel-Satchel-In-Red-Crocodile-Leather-it-3158 https://www.bababorses.de/Louis-Vuitton-Iphone-Case-LV18-59-it.html https://www.bababorses.de/LOUIS-VUITTON--CLASSIC-MINI-PACKBACK-2872-it.html https://www.bababorses.de/Balenciaga-Velo-Anthracite-store-it-1723 https://www.bababorses.de/Louis-Vuitton-Monogram-Ebene-Canvas-Pegase-Legere-53-Business-Rolling-Luggage-6950-it.html https://www.bababorses.de/Louis-Vuitton-Crocodilien-Brillant-Capucines-Mini-Bag-N93429-Black-2231-it.html https://www.bababorses.de/Louis-Vuitton-Monogram-Hoodie-Jacket-Black-1526-it.html https://www.bababorses.de/Louis-Vuitton-Monogram-Coated-Canvas-Popincourt-PM-M43462--Raisin-3345-it.html https://www.bababorses.de/Louis-Vuitton-Lockme-Cabas-Tote-M55028-Black-4530-it.html https://www.bababorses.de/Givenchy-Antigona-Small-Leather-Satchel-Bag-Black-it-2432 https://www.bababorses.de/Louis-Vuitton-Monogram-Canvas-Small-Malle-Chain-Bag-3294-it.html https://www.bababorses.de/Louis-Vuitton-Epi-Leather-Zippy-Wallet-M62304-Red-7304-it.html https://www.bababorses.de/Louis-Vuitton-Iphone-Case-LV113-38-it.html https://www.bababorses.de/Louis-Vuitton-Heel-10.5cm-Eyeline-Pumps-Python-Pattern-Suede-Black-5999-it.html https://www.bababorses.de/LOUIS-VUITTON-PEGASE-LEGERE-REGATTA-N41620-MONOGRAM-CANVAS-6974-it.html https://www.bababorses.de/Louis-Vuitton-Kimono-Wallet-M56175-Pink-7437-it.html https://www.bababorses.de/Louis-Vuitton-Monogram-Tapestry-Denim-Bidart-Espadrilles-Blue-5726-it.html https://www.bababorses.de/Louis-Vuitton-Women-s-Escale-Shirtdress-Blue-1709-it.html https://www.bababorses.de/Louis-Vuitton-Montaigne-MM-M41048-Black-4597-it.html https://www.bababorses.de/Louis-Vuitton-Heel-10cm-Crystals-Call-Back-Sandals-Suede-Red-6160-it.html https://www.bababorses.de/Hermes-Bolide-31cm-Togo-Leather-Green-Bag-it-1070 https://www.bababorses.de/Replica-Hermes-Wallet-H001-Wallet-Cow-Leather-Green-it-1558 https://www.bababorses.de/Celine-Medium-Luggage-Tote-Black-Brown-White-Bag-it-2168 https://www.bababorses.de/Louis-Vuitton-Pochette-Voyage-MM-Bag-Damier-Graphite-Canvas-Pixel-N60176-Green-7278-it.html https://www.bababorses.de/Fendi-Black-Snake-Veins-Leather-With-Beige-Ferrari-Leather-Top-handle-Bag-it-469 https://www.bababorses.de/Louis-Vuitton-All-over-Monogram-Sleeveless-Belted-Dress-Navy-1375-it.html https://www.bababorses.de/Louis-Vuitton-Ring-02-560-it.html https://www.bababorses.de/Louis-Vuitton-Iphone-Case-LV32-76-it.html https://www.bababorses.de/Louis-Vuitton-Dauphine-MM-M55071-Blue-4511-it.html https://www.bababorses.de/Louis-Vuitton-Supreme-Iphone-Case-White-Red-212-it.html https://www.bababorses.de/Louis-Vuitton-Epi-Smooth-Leather-Twist-Shoulder-Bag-MM-Pink-Black-2639-it.html https://www.bababorses.de/Louis-Vuitton-Monogram-Empreinte-Leather-Cosmetic-Pouch-Bag-M80502-Bouton-de-Rose-Pink-By-The-Pool-Capsule-Collection-4296-it.html https://www.bababorses.de/Louis-Vuitton-Bracelet-21-271-it.html https://www.bababorses.de/Louis-Vuitton-Heel-9.5-cm-Star-Trail-Ankle-Boots-Black-5511-it.html https://www.bababorses.de/Louis-Vuitton-Geronimos-Belt-Bag-M43502-Black-Epi-Leather-2646-it.html https://www.bababorses.de/Louis-Vuitton-Damier-Ebene-Canvas-Vavin-Chain-Wallet-N60222-Bordeaux-Red-7221-it.html https://www.bababorses.de/Louis-Vuitton-Monogram-Empreinte-Leather-Zippy-Coin-Purse-M80408-Cream-Saffron-By-The-Pool-Capsule-Collection-7741-it.html https://www.bababorses.de/Louis-Vuitton-Vintage-Monogram-Vernis-Bleecker-Box-Top-Handle-Bag-Burgundy-4172-it.html https://www.bababorses.de/Prada-Saffiano-Mini-Galleria-Crossbody-Bag-Beige-it-2708 https://www.bababorses.de/Louis-Vuitton-Sunglasses-39-1042-it.html https://www.bababorses.de/Louis-Vuitton-Monogram-Canvas-Leopard-Print-Onthego-Tote-Bag-M44674-Black-White-3232-it.html https://www.bababorses.de/Louis-Vuitton-Epi-Leather-Twist-PM-Bag-with-Crystal-embellished-Chain-M55412-White-2630-it.html https://www.bababorses.de/Fendi-Chameleon-Red-Cross-Veins-Leather-Tote-Bag-it-488 https://www.bababorses.de/Louis-Vuitton-Monogram-Canvas-Onthego-Tote-Bag-M44571-Kaki-3270-it.html https://www.bababorses.de/Fendi-Earth-Yellow-Leather-with-Multicolor-Striped-Fabric-Shopping-Handbag-it-771 https://www.bababorses.de/Louis-Vuitton-Croco-Pattern-Petite-Boite-Chapeau-Bag-Black-4090-it.html https://www.bababorses.de/Prada-Saffiano-Small-Double-Handle-Tote-Bag-Light-Gray-Pomice-it-2849 https://www.bababorses.de/Louis-Vuitton-Lvxlol-Speedy-BB-M45202-Golden-3125-it.html https://www.bababorses.de/Louis-Vuitton-Gloria-Flat-Open-Back-Loafers-Monogram-Canvas-5798-it.html https://www.bababorses.de/LOUIS-VUITTON-BREA-PM-Monogram-Vernis-leather-IN-MORDORE-4074-it.html https://www.bababorses.de/Replica-Hermes-Steve-H2810-Ladies-Shoulder-Bag-Cow-Leather-it-1428 https://www.bababorses.de/Louis-Vuitton-Noe-bag-M42226-Brown-3496-it.html https://www.bababorses.de/Louis-Vuitton-Damier-Azur-Canvas-I-2260-it.html https://www.bababorses.de/Christian-Dior-Multicolor-PeachYellow-Zipper-Wallet-118-it-223 https://www.bababorses.de/Fendi-By-the-Way-Small-Tricolor-Satchel-Bag-it-2916 https://www.bababorses.de/Prada-Medium-Vitello-Diano-Open-Tote-Bag-Pomice-it-2728 https://www.bababorses.de/Luxury-Hermes-Wallet-H001-Unisex-Wallet-it-1598 https://www.bababorses.de/Louis-Vuitton-Iphone-Case-LV42-104-it.html https://www.bababorses.de/Prada-Saffiano-Small-Gardeners-Tote-Bag-Blue-it-2803 https://www.bababorses.de/Louis-Vuitton-Sac-Tricot-Bag-Epi-Leather-Red-M52805-2736-it.html https://www.bababorses.de/Louis-Vuitton-Crazy-in-Lock-Strass-Bracelet-Silver-316-it.html