Dplmatrix

From DynamicPageList3 Manual
Manual dplmatrix


This function is a side entry into DPL for which there are five parameters required in a specific order, the last of which is an indented list of article names that must be passed to DPL3 to generate a matrix view. With copy/paste a matrix can be easily transferred to Excel to polish it there, like turning column texts to vertical, highlighting cells etc.


Syntax[edit]

{{#dplmatrix: name | yes | no | mode | indented_list }} where:

  1. name – The desired name of the matrix. Appears in the upper left cell. Arbitrary wiki formatting, even images, are possible.
  2. yes – The desired text/symbol indicating a link – (default is x).
  3. no – The desired text/symbol indicating the absence of a link – (default is empty).
  4. mode – The mode to display rows and columns in. Accepted mode values are:
    • flip – When specified, rows and columns are reversed or flipped.
    • normal – Normal display – (default)
  5. indented_list The indented list of article names.
    • Source articles must start in column 1.
      • In the normal mode, these articles populate the first cell of rows, and either link to or don't, the articles listed in column headers as indicated by link symbols.
    • Target items must be indented by at least one space (in normal mode, they populate column headers).
    • After the article name ~~ may be used to set article title. Row and column headers hyperlink to the articles if titles are specified they are used instead.
    • 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) is shown.
    • If the same source line appears multiple times, the targets are joined (added).


Examples[edit]

The best way to understand how #dplmatrix functions, is to view described examples, such as the ones included below. The first examples illustrate manually created indented lists, to better understand the basic matrix functions. The idea, however, is to use DPL3 to generate indented lists automatically, and also mark the links between them automatically, which is demonstrated in the last example.


Example 1: {{#lsth:Examples/Module: dplmatrix (example 1)|Example}}

Page Template:ViewTest/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").

Result: {{#lsth:Examples/Module: dplmatrix (example 1)|Result}}


Example 2: {{#lsth:Examples/Module: dplmatrix (example 2)|Example}}

Page Template:ViewTest/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").

Result: {{#lsth:Examples/Module: dplmatrix (example 2)|Result}}


Example 3: {{#lsth:Examples/Module: dplmatrix (example 3)|Example}}

Page Template:ViewTest/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").

Result: {{#lsth:Examples/Module: dplmatrix (example 3)|Result}}

Notes[edit]

{{#lsth:Examples/Module: dplmatrix (example 3)|Notes}}

Template content[edit]

{{#lsth:Examples/Module: dplmatrix (example 3)|Template content}}