O'Reilly logo

Dreamweaver in a Nutshell by Bruce A. Epstein, Heather Williamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19. Customizing the Interface

Dreamweaver 4 offers greater extensibility and customization than its predecessors and competitors. Beyond the preferences covered in the previous chapter, you can customize Dreamweaver’s menus, keyboard shortcuts, and Objects panel (downloadable extensions, described in Chapter 22, often modify these UI elements to give developers access to enhanced functionality).

Customizing Menus

Dreamweaver menus are defined in an XML-like syntax and stored in the Dreamweaver4/Configuration/Menus/menus.xml file. To customize the menus, exit Dreamweaver and modify the menus.xml file in a text editor, such as WordPad (Windows) or BBEdit (Macintosh).

Warning

Do not edit the menus.xml file in an XML-savvy editor, as it is not a true XML file. It contains ampersands (&) that generate errors when the XML is parsed. Also, don’t edit menus.xml in Dreamweaver. Don’t change the existing id attributes within the file. If you make a mistake, restore menus.xml from the backup copy, menus.bak, provided by Macromedia in the same folder.

The menus.xml file defines menu bars, menus, and menu items. Example 19-1 shows an excerpt of the code that defines Dreamweaver’s Edit menu.

Example 19-1. An excerpt of the Edit menu definition

<menu name="_Edit" id="DWMenu_MainSite_Edit"> <menuitem name="Cu_t" key="Cmd+X" enabled="dw.canClipCut( )" command="dw.clipCut( )" id="DWMenu_MainSite_Edit_Cut" /> <menuitem name="_Copy" key="Cmd+C" enabled="dw.canClipCopy( )" command="dw.clipCopy( ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required