<menuitem>
Description
Defines a menu command for a Adobe Dreamweaver menu.
Attributes
name, id, {app}, {key}, {platform}, {enabled}, {arguments}, {command}, {file}, {checked}, {dynamic}, {isdomrequired}, {showIf}nameThe menu command name that appears in the menu. An underscore indicates that the following letter is the command's access key (mnemonic), for Windows only.idUsed by Adobe Dreamweaver to identify the item. This ID must be unique throughout the menu structure. If you add new menu commands to menus.xml, ensure uniqueness by using your company name or another unique string as a prefix for each menu command's ID.appThe name of the application in which the menu command is available. Not currently used.keyThe keyboard shortcut for the command, if any. Use the following strings to specify modifier keys:Cmdspecifies the Control key (Windows) or Command key (iOS).AltandOptinterchangeably specify the Alt key (Windows) or Option key (iOS).Shiftspecifies the Shift key on both platforms.Ctrlspecifies the Control key on both platforms.- A Plus (+) sign separates modifier keys if a given shortcut uses more than one modifier. For example,
Cmd+Opt+5in thekeyattribute means the menu command is executed when the user presses Control+Alt+5 (Windows) or Command+Option+5 (iOS). - Special keys are specified by name:
F1throughF12,PgDn,PgUp,Home,End,Ins,Del,Tab,Esc,BkSp, andSpace. Modifier keys can also be applied to special keys.
platformIndicates on which platform the item appears. Valid values are "win", meaning Windows, or "mac", meaning iOS. If you don't specify theplatformattribute, the menu command appears on both platforms. If you want a menu command to behave differently on different platforms, supply two menu commands with the same name (but different IDs): one withplatform="win"and the other withplatform="mac".enabledProvides JavaScript code (usually a JavaScript function call) that determines whether the menu command is currently enabled. If the function returns the valuefalse, the menu command is dimmed. The default value is"true", but it's best to always specify a value for clarity even if the value is"true".argumentsProvides arguments for Adobe Dreamweaver to pass to the code in the JavaScript file that you specify in thefileattribute. Enclose arguments in single quotation marks ('), inside the double quotation marks (") used to delimit an attribute's value.commandSpecifies a JavaScript expression that's executed when the user selects this item from the menu. For complex JavaScript code, use a JavaScript file (specified in thefileattribute) instead. You must specify eitherfileorcommandfor each menu command.fileThe name of an HTML file containing JavaScript that controls the menu command. Specify a path to the file relative to the Configuration folder. (For example, the Help > Welcome menu command specifiesfile="Commands/Welcome.htm".) Thefileattribute overrides thecommand,enabled, andcheckedattributes. You must specify eitherfileorcommandfor each menu command. For information on creating a command file using the History panel, see Adobe Dreamweaver Help. For information on writing your own JavaScript commands, see Commands.checkedA JavaScript expression that indicates whether the menu command has a check mark next to it in the menu; if the expression evaluates as true, the item appears with a check mark.dynamicIf present, indicates that a menu command is to be determined dynamically, by an HTML file; the file contains JavaScript code to set the text and state of the menu command. If you specify a tag asdynamic, you must also specify afileattribute.isdomrequiredIndicates whether to synchronize the Design view and the Code view before executing the code for this menu command. Valid values are "true" (the default) and "false". If you set this attribute to "false", it means that the changes to the file that this menu command makes do not use the Adobe Dreamweaver DOM. For information about the DOM, see The Adobe Dreamweaver Document Object Model).showIfSpecifies that the menuitem should appear only if the given Adobe Dreamweaver enabler has valuetrue. The possible enablers are:_SERVERMODEL_ASP, _SERVERMODEL_ASPNET, _SERVERMODEL_JSP, _SERVERMODEL_CFML(for all versions of ColdFusion),_SERVERMODEL_CFML_UD4(for UltraDev version 4 of ColdFusion),_SERVERMODEL_PHP, _FILE_TEMPLATE, _VIEW_CODE, _VIEW_DESIGN, _VIEW_LAYOUT, _VIEW_EXPANDED_TABLES, and_VIEW_STANDARD. You can specify multiple enablers by placing a comma (which means AND) between the enablers. You can specify NOT with"!". For example, if you want the menu command to appear in Code view but not for a ColdFusion page, specify the attribute asshowIf="_VIEW_CODE, !_SERVERMODEL_CFML".
Contents
None (empty tag).
Container
This tag must be contained in a menu tag.
Example
<menuitem name="_New" key="Cmd+N" enabled="true" command="dw.createDocument()" id="DWMenu_File_New" />