Help:DPL/manual/dplmatrix
From Guild Wars 2 Wiki
Jump to navigationJump to search
This is an auxiliary function module within the DPL package. It takes an indented list of data, and provides a matrix summary view of the same data. It can also be combined with the outputs of regular DPL queries.
Usage[edit]
{{#dplmatrix: name | yes | no | mode | indented list }}
Parameters[edit]
There are five parameters which must be given in the order listed here:
- The name of the matrix. Appears in the upper left cell. Arbitrary wiki formatting (even images) are possible.
- The symbol for cells which symbolize that the row and column are related (yes). Default is "x".
- The symbol for cells which symbolize the absence of a link between the row and column (no). Defaults to blank cell.
- The mode ('normal' or 'flip'); default is 'normal'. When 'flip' is specified, rows and columns will be exchanged.
- The indented list.
- source items must start in column 1
- target items must be indented by at least one space (these are sorted alphabetically for the output display)
- after the item name you can add "~~" and a 'label'. Row and column titles of the matrix will contain hyperlinks to the items. If labels are specified, they will be used instead of the item names.
- lines which are empty or contain only spaces are silently ignored.
- if a source line is not followed by one or more target lines an empty table row (or column in flip mode) will be shown.
- if the same source line appears multiple times, the targets will be combined.
Examples[edit]
- Example 1 (normal matrix)
Input: {{#dplmatrix:Matrix 1|{{yes}}|{{no}}|normal| Asura Helmet Gloves Charr ~~ Rytlock Gloves Human Norn Boots Charr ~~ Rytlock Leggings }} |
Output:
|
- Example 2 (flipped matrix)
Input:
{{#dplmatrix:Matrix 1|{{yes}}|{{no}}|flip| Asura Helmet Gloves Charr ~~ Rytlock Gloves Human Norn Boots Charr ~~ Rytlock Leggings }} |
Output:
|
Note[edit]
- Examples on this page have the CSS class
table.dplmatrix
defined for this page only with custom CSS.