guides:o4w:o4w_api:o4wmenu

O4WMenu routine

Builds a menu on the current page using the menu definition.

O4WMenu(menuName, errMsg, replaceName, overrideType, styleInfo)

The function has the following parameters:

ParameterDescription
menuNameThe menu definition.

The location and type of the menu is determined by the location of special “tags” in the template. These tags should be placed in the template wherever the menu should be displayed, along with an optional orientation to specify which type of menu should be used. The standard tags are %MENU-H% (for a horizontal menu), %MENU-V% (for a vertical menu), %MENU-T% (for a tree menu), or %MENU% (to use the orientation specified in the configuration record). A special tag, %MENU-NONE%, is used to indicate that no menu should be displayed. Users can also create additional “named” menu tags for specific menus; these are accessed by specifying which named menu to use in the specificName parameter. Specific menu tags can be placed in the template by using the format “%MENU.<specificname>{-<orientation>}%” (for example, “%MENU.leftside%” or “%MENU.top-H%”), where <orientation> can be “H” (for Horizontal), “V” (for vertical), “T” (for a tree menu), or “NONE” to indicate the menu should NOT be displayed. If <orientation> is omitted, the default orientation specified in the configuration record is used.

If no menu tags are found for either the default or named menus, the menu is drawn at the current location in the “flow” of the web page output.
errMsgA string is placed in this parameter if an error is encountered.
replaceNameThe name of tag to look for in the template. Defaults to "MENU".
overrideTypeThe type of menu to draw, overriding what is found in the template.

0 - Vertical Menu
1 - Horizontal Menu
2 - Tree Menu
styleInfoThe style values to be applied to the menu. Include support for the O4WHTMLOptions for "return html".
  • guides/o4w/o4w_api/o4wmenu.txt
  • Last modified: 2024/06/19 20:19
  • by 127.0.0.1