|
|
Hitop Reference: Macro ExpansionsNavigation<@NAV (DATA="navdata"|SRC="filename") [FORMAT="(FLAT|FOLDED|OPEN)"] [ENTRY="procname"] [PREGROUP="procname"] [POSTGROUP="procname"] [FROM=num] [TO=num]> Produces a navigation bar or list specific to the current page of a site. The site definition may be supplied as either inline DATA or from a file. The inline data is of the format: "Page1=index.html,List2=(Page2=page2.html,Page3=page3.html)" The NAV file is of the format: Page1=index.html The available formats are FLAT (the open layers of the hierarchical menu are output one after another), FOLDED (the open layers are interleaved in the correct places in the hierarchical menu) and OPEN (the hierarchical menu is always displayed in full. The default styles can be overridden by using formatting procedures. The named procedures for PREGROUP (called before each level in a menu), POSTGROUP (called after each level in a menu) and ENTRY (called for each entry in the menu) are: <entry LEVEL="num" HIGHEST="num" NAME="label" HREF="url" SELECT="num"
TYPE="num" OPEN="num" POSITION="num" TOTAL="num"> Where LEVEL is the current level of hierarchy numbered from 0, HIGHEST is the highest level of hierarchy currently displayed, NAME is the label of the entry, HREF is the URL the label should link to, SELECT contains 0 for an unselected link, 1 for a selected link and 2 for a selected submenu, TYPE contains 0 for a link and 1 for a submenu, OPEN contains 0 for unselected and 1 for selected, POSITION contains the position of this item in the current level numbered from 1, and TOTAL contains the total number of items in the current level. (TYPE and OPEN supersede SELECT) The FROM and TO parameters let you choose to display only a subset of the available levels of hierarchical menu. Repetition<@FOR ENTRY="procname" FROM="num" TO="num" [STEP="num"]> A simple for-loop. The current value is passed to the procedure in the variable COUNT. The direction of counting is automatic. Iteration<@FOREACH ENTRY="procname" ( [DATA="data"] [SEP="separator"] [FROM=num] [TO=num] | SRC="filename" | PREFIX="varprefix" ) > Calls the named procedure with items from DATA passed as the parameter named CONTENT and its position in the list in COUNT. The default separator, null, will pass each character in turn. The separator can be altered to any valid string. The FROM and TO parameters let you take a subset of the CONTENT you provide for processing. Where the SRC is specified the data will be read from a file a line at a time. As above the named procedure will be called with each line in CONTENT and COUNT set to the line number. You can use your procedure to do data filtering and the like. When PREFIX is given, the procedure will be called passing each variable whose name begins with that prefix in turn, in alphabetical order. The variable's name will be passed in NAME and its value in VALUE. | |
|
Last updated 1999-06-10 |