beautypg.com

Chapter 10: menus and menu commands, The menus.xml file, Menus and – Adobe Extending Dreamweaver CS4 User Manual

Page 147: Menu commands, Menus and menu commands

background image

141

Chapter 10: Menus and menu commands

Adobe Dreamweaver creates all its menus from the structure defined in the menus.xml file in the Dreamweaver
Configuration/Menus folder. You can rearrange, rename, and remove menu commands by editing the menus.xml file.
You can also add, change, and remove keyboard shortcuts for menu commands. But, in most cases it is easier to edit
keyboard shortcuts using the Keyboard Shortcut Editor (see Dreamweaver Help). Changes to the Dreamweaver menus
take effect the next time you start Dreamweaver or reload extensions.

The menus.xml file

The menus.xml file contains a structured list of menu bars, menus, menu commands, separators, shortcut lists, and
keyboard shortcuts. XML tags describe these items and you can edit them in a text editor.

Note: Be careful when changing menus. Dreamweaver ignores any menu or menu command that contains an XML
syntax error.

In a multiuser operating system, you can make changes within Dreamweaver that result in changes to menus.xml. For
example, changing keyboard shortcuts using the Keyboard Shortcut Editor. In such cases, Dreamweaver creates a
menus.xml file in your user Configuration folder. To customize menus.xml in a multiuser operating system, edit the
copy of the file in your user Configuration folder. Otherwise, copy the master menus.xml file to your user
Configuration folder if Dreamweaver hasn’t yet created a version there. For more information, see

Multiuser

Configuration folders

” on page 78.

If you open menus.xml in an XML editor, sometimes you see error messages regarding the ampersands (&) in the
menus.xml file. It’s best to edit menus.xml in a text editor; do not edit it in Dreamweaver. For basic information about
XML, see Dreamweaver Help.

Note: Always make a backup copy of the current menus.xml file, or any other Dreamweaver configuration file, before you
modify it. In case you forget to make a backup, replace menus.xml with a copy of menus.bak in the Configuration folder .

A menu bar (tagged with opening and closing

menu bar

tags) is a discrete menu or set of menus. For example, there’s

a main menu bar, a separate Site panel menu bar (which appears only on Windows, not the Macintosh), and a menu
bar for each context menu. Each menu bar contains one or more menus; a menu is contained in a menu tag. Each menu
contains one or more menu commands, each described by a

menuitem

tag and its attributes. A menu can also contain

separators (described by separator tags) and submenus.

In addition to the primary keyboard shortcuts associated with menu commands, Dreamweaver provides alternate and
context-specific shortcuts. For example, Control+Y (Windows) or Command+Y (Macintosh) is the shortcut for Redo.
At the same time, Control+Shift+Z or Command+Shift+Z is an alternate shortcut for Redo. These alternates and
context-specific shortcuts that can’t be represented in the tags for menu commands are defined in the shortcut lists in
the menus.xml file. Each shortcut list (described by a

shortcutlist

tag) contains one or more shortcuts, each of

which a shortcut tag describes.

The next sections describe the syntax of the tags in the menus.xml file. Optional attributes are marked in the attribute
lists with curly brackets ({ }); all attributes not marked with curly brackets are required.

This manual is related to the following products: