<%-- menuitems.jsp (Stand alone jsp; does not require Revize server) Sorts multi-level menu items at view time and sets display status for each item (the menu items could be sorted during publishing and the sort eliminated) The file is included into on a Revize template used to build a jsp include file containing active menu items. --------------- Input Arguments --------------- pRecords Menuitems Array of all menu items eligible for display on page The array is populated with active menu items. Menuitems is a class declared by the template which contains all the link manager module fields. The following menu specific fields are required: linklevel linkparentid linkstyle linksortkey pageid String representing the link module recordid of the current page. The display status of all menu items is based on this field. showLevel String indicating the level at which all items are displayed (by default all level 0 items are displayed) --------------- Return Argument --------------- The following Menuitems array elements set for each menu item: linkkey The sort key calculated to sort the Menuitems linkstyle One of the following setting: --%> <%! public void menusort(Menuitems[] pRecords, String pageid) { menusort(pRecords, pageid, "0"); } public void menusort(Menuitems[] pRecords, String pageid, String showLevelStr) { if (pRecords == null) return; //----- Save records in hashmap by recordid key HashMap menuStyle = new HashMap(); HashMap menuRecords = new HashMap(); for (int i=0; i