Specifies one or more menu items in a menu.
You should use CSS color properties and the 'hover' pseudo-class in new markup to replace the deprecated onColor and offColor attributes.
If you don't specify the pane attribute (see Block attributes) explicitly, the output will appear in the pane associated with the containing menu. This is true unless the target for the menu is a spatial format iterator, in which case MCS will determine the instance automatically.
Attribute | Description | Type | Default | Options | Use |
---|---|---|---|---|---|
href | The URL to link to if the menu item is selected | xs:string | none | required | |
image | The name of the image policy to use in a fixed-image menu | xs:string | none | optional | |
offColor | The color to be used for 'off' text | xs:string | none | deprecated | |
offImage | The image policy for the off menu pointer | xs:string | none | optional | |
onColor | The color to be used for 'on' text | xs:string | none | deprecated | |
onImage | The image policy for the on menu pointer | xs:string | none | optional | |
prompt | Prompt text | xs:string | none | optional | |
rolloverImage | The rollover image policy to be used | xs:string | none | optional | |
segment | The segment of a montage in which the output from this element should be placed, Note:
The segment attribute is not supported by Mobile Portal Accelerator. |
xs:string | none | optional | |
shortcut | Defines a way of giving focus to this element | xs:string | none | A literal, JSP expression, or text policy | optional |
text | The text of the menu item | xs:string | none | required |
The welcome.mlyt layout can be found in the MCS/repository/xml-repository directory.
<?xml version="1.0" encoding="UTF-8"?>
<canvas layoutName="/welcome.mlyt" pageTitle="menu">
<menu pane="congratulations" title="Menu">
<label>Main Menu</label>
<menuitem href="home.xml" text="Home"/>
<menuitem href="specials.xml" text="Special Offers"/>
</menu>
<pane name="background">
<p>Welcome</p>
</pane>
</canvas>