• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Moving on Down the Road: Int... > What Else Is on the Menu?

What Else Is on the Menu?

If you decide to explore the depths of the Dreamweaver menu structure, you should know a few things first about the format of the controlling file, menus.xml. First, every main item (there are 10 in the standard Dreamweaver menu:File, Edit, View, and so on) contains a list of separate menu items. Each menu item contains a unique id attribute and an optional keyboard shortcut. Whether the menu item is displayed is controlled by the enabled attribute; if the enabled attribute evaluates as true, the item is available; if it’s false, the menu item is disabled. What determines the function of a menu item? There are two possible, mutually exclusive attributes: command and file. The command attribute takes a JavaScript function, often a Dreamweaver API call; for example, the command value for the File > Save All menu item is dw.saveAll(). The second attribute, file, points to a HTML file in the Dreamweaver MX 2004\Configuration folder—either the main or the user’s configuration—which contains JavaScript too complex to fit in a single line or opens a dialog box. When you are modifying the menus.xml file, take extreme care to properly code your entries (not to mention always work with a backup at the ready). Dreamweaver disables the menu items containing any entries with incorrect syntax. For complete details, see Help > Extensions> Extending Dreamweaver.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint