Menu items can be generated through an indirect reference, such as a method, variable, or data service, as long as the reference contains schema-typed menu data.
The return value of the indirect reference is an XML file. The schema of the XML is factory/xml/schemas/contextualmenu.xsd
The indirect reference must contain these elements:
Text for the NAME element
Every ATTRIBUTE child of ACTION must be an HTML attribute in the result HTML. For example, if <ATTRIBUTE name="href" value="#"/>, the result HTML will be href=#.
The indirect reference may contain these elements:
The default value is True.HIDE
The default value is False.
If the indirect reference contains TYPE elements, they are handled in one of two ways:
- If the text of the TYPE element is not Separator, the builder sets the text of the TYPE element to the default value of "MenuItem."
- If the text of the TYPE element is Separator, the builder ignores the other children of the Item element.
Follow the steps in this example to use an indirect reference to generate menu items.
- Add a Contextual Menu builder to a page location in the model.
- Select Portal-style Button as the Control Type.
- Provide the Button/Link Text.
- Select Indirect Reference as the Menu Content.
- Specify an Indirect Reference value to generate menu items.
- Click OK.
Parent topic: Contextual Menu builder