This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Template:LinkBar

From OWASP
Revision as of 16:10, 8 September 2010 by Thomas Herlea (talk | contribs) (Changed to explicitly numbered parameters when calling inner templates in order to prevent whitespace around parameter from confusing them.)

Jump to: navigation, search

Purpose

Generates a bar that can contain navigation links of "Previous", "Main" and "Next" type.

The links themselves are generated by including other templates into this template. The names of the inner templates are passed as parameters.

Usage

{{LinkBar
  | useprev=PREV_LINK_TEMPLATE | prev=PREV_LINK_TARGET | lblprev=PREV_LINK_LABEL
  | usemain=MAIN_LINK_TEMPLATE | main=MAIN_LINK_TARGET | lblmain=MAIN_LINK_LABEL
  | usenext=NEXT_LINK_TEMPLATE | next=NEXT_LINK_TARGET | lblnext=NEXT_LINK_LABEL
}}

If the lbl* parameters are omitted or empty, the targets of the links will be used as labels, too.

Inner Template Requirements

The inner templates are expected to generate a link, possibly with ornamentation (arrows, extra text,...). The inner templates must accept one or two parameters, the first one for the target of the link, the second one for the label of the link. If the second parameter is missing or empty, the inner template must use the link's target as label.