Adobe 38040334 - Dreamweaver CS3 User Manual page 153

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Modifying the Commands menu
You can add certain kinds of commands to the Commands menu, and change their names, without editing the
menus.xml file. For more information about menus.xml, see "Changing menus and menu commands" on page 143.
Note: The term command has two meanings in Dreamweaver. Strictly speaking, a command is a particular kind of
extension. In some contexts, however, command is used interchangeably with menu item to mean any item that appears
in a Dreamweaver menu, no matter what it does or how it's implemented.
To create new commands that are automatically placed in the Commands menu, use the History panel. Alternatively,
you can use the Extension Manager to install new extensions, including commands. For more information, see
Dreamweaver Help.
To reorder the items in the Commands menu, or to move items between menus, you must edit the menus.xml file.
To rename a command you've created:
Select Commands > Edit Command List.
1
A dialog box appears, listing all the commands whose names you can change. (Commands that are in the default
Commands menu don't appear on this list and can't be edited using this approach.)
Select a command to rename.
2
3
Enter a new name for it.
Click Close.
4
The command is renamed in the Commands menu.
To delete a command you've created:
Select Commands > Edit Command List.
1
A dialog box appears, listing all the commands you can delete. (Commands that are in the default Commands menu
don't appear on this list and can't be deleted using this approach.)
Select a command to delete.
2
3
Click Delete, and then confirm that you want to delete the command.
The command is deleted. The file that contains the code for the command is also deleted; deleting a command does
not simply remove the menu command from the menu. Be certain that you really want to delete the command before
you use this approach. If you want to remove it from the Commands menu without deleting the file, you can find the
file in Configuration/Commands and move it to another folder.
4
Click Close.
How menu commands work
When the user clicks a menu with a menu item that contains a menu command, the following events occur:
If any
tag in the menu contains the
1
menuitem
function in the associated menu commands file to populate the menu.
Dreamweaver calls the
2
canAcceptCommand()
menu to check whether the command is appropriate for the selection.
• If the
canAcceptCommand()
attribute, Dreamweaver calls the
dynamic
function in each menu commands file that is referenced in the
function returns a
value, the menu item is dimmed.
false
DREAMWEAVER CS3
Extending Dreamweaver
getDynamicContent()
147

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents