Customizing Dreamweaver MX Menus Using
Another integral part of Dreamweaver MX are the menu items. You navigate them to
files, copy text, insert commands, and view help all through the
drop-down menus that Dreamweaver MX contains. Like most software applications, everything that you could possibly insert, view, edit, or interact with are available through these drop-down menus. Unlike most software applications, Dreamweaver MX enables you to customize the menu items or subitems to meet your needs.
Because all the menus are generated from one XML-based file, you as the
have complete control to add, remove, and change keyboard shortcuts as well as rearrange, rename, and remove menu items.
Menus.xml Tag Syntax
Before you begin making any changes to the menus.xml file, it might be helpful to see how it is structured. XML, like HTML, is tag based, which means that for every opening tag, there must be a closing tag, although some tags simply close
by adding the "/" at the end. If you open the menus.xml file, located in Macromedia\Dreamweaver MX\Configuration\Menus, you will notice that it is very much structured like an HTML page but contains slightly different syntax. The reason for this is that it is XML. XML defines data, not how data should be structured, which is what HTML takes care of. By defining the data that menus should contain, Dreamweaver MX can, in
, use the information to dynamically construct the menus whenever the application is loaded.
Never open the menus.xml file in Dreamweaver MX; open it in a different text editor such as Notepad.
XML, unlike HTML, allows you to create your own tags, hence the reason for the custom tag syntax. Navigating the menus.xml file for the first time can be somewhat of a challenge. The following
should help to clear things up:
Provides information about a menu bar in the Dreamweaver MX menu structure.
Provides information about a menu or submenu to appear in the Dreamweaver MX menu structure. This tag must reside within the <menubar> tag.
Defines a menu item for a Dreamweaver MX menu. The tag must reside within a menu tag.
Indicates that a separator should be present in the menu. This tag must reside within a <menu> tag.
Specifies a shortcut list in the menus.xml file. This tag will contain one or more <shortcut> tags.
Specifies a keyboard shortcut in the menus.xml. This tag must be contained within a <shortcutlist> tag.
With this knowledge, you should now be able to rearrange menu items.
Rearranging Menus and Menu Items
Editing the menus.xml file allows for great control over how your menus are structured. A lot of people, including
, are used to working within environments that they are familiar with. When a new program comes out that deviates from the traditional File, Edit, View, structure, it becomes difficult to adapt. Fortunately with Dreamweaver MX, that can be changed. Modifying the menus.xml file enables you to move items within a menu or out of and into another menu, add or remove separators, and add menu bars and even move one menu into another menu.
Before you make any modifications to the menus.xml file, you should make a copy of it as a backup.
To move a menu item, follow these steps:
Open the menus.xml file in Notepad.
Cut an entire menu item tag from the beginning to its closing tag, as shown in Figure 20.13.
Figure 20.13. Cutting the "cut" and moving it below "copy" will change it in the IDE as well.
Paste the menu item tag into its new insertion point, making sure that it is still nested within a menu tag.
Restart Dreamweaver and check the menu that you pasted the menu tag into.
of a Menu or Menu Item
You can easily change the name of a menu or menu item by following these steps:
Open the menus.xml file in Notepad.
To change a menu item, simply change the name attribute.
Save and close the file and restart Dreamweaver MX.
Changing Keyboard Shortcuts Using the Keyboard Shortcuts Editor
way to change shortcuts is by using the shortcuts editor, available from the Edit menu. Selecting this command launches the Keyboard Shortcuts editor pictured in Figure 20.14.
Figure 20.14. The easiest way to modify shortcuts is by launching the Keyboard Shortcuts editor from the Edit menu.
The Keyboard Shortcuts editor contains a few important features that are worth mentioning:
Indicates the keyboard shortcuts sets that Dreamweaver MX supports.
The commands allow you to choose from a specific menu bar. Notice that depending on which window you are in, the menu bar changes. Commands enable you to navigate between all of these.
Indicates the shortcut that the command is currently set to.
Place your cursor in this field and click the keyboard combination to change the keyboard shortcut.
To change a keyboard shortcut using the editor, follow these steps:
Select the set from the Current Set selector. Default is Macromedia Standard.
Select the command set that you would like to change.
Select the shortcut from the shortcuts list.
Place your cursor inside the Press Key field and select the shortcut that you would like to change it to.