Portlet Factory, Version 6.1.2


 

Creating a menu that generates content through an indirect reference

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

ACTION 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:

ENABLE

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.

  1. Add a Contextual Menu builder to a page location in the model.

  2. Select Portal-style Button as the Control Type.

  3. Provide the Button/Link Text.

  4. Select Indirect Reference as the Menu Content.

  5. Specify an Indirect Reference value to generate menu items.

  6. Click OK.

Parent topic: Contextual Menu builder


Library | Support |