Dplmatrix: Difference between revisions
imported>FrozenPlum m 11 revisions imported: Imported from help.fandom.com, Extension:DPL3 pages, which are for the obsolete version of DPL3 extension for MediaWiki 1.33, to adapt to forked (newer) extension version. |
imported>FrozenPlum No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1:
{{DPL manual|section=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==
▲ {{#dplmatrix: name | yes | no | mode | '''indented_list''' }}
# <code>''name''</code> – The desired name of the matrix. Appears in the upper left cell. Arbitrary wiki formatting,
# <code>''yes''</code> – The desired text/symbol indicating a link – (default is {{tt|x}}).
# <code>''no''</code> – The desired text/symbol indicating the '''absence''' of a link – (default is empty).
# <code>''mode''</code> – The mode to display rows and columns in. Accepted mode values are:
#* <code>''flip''</code> – When specified, rows and columns are reversed or flipped.
#* <code>''normal''</code> – Normal display – (default)
# <code>''indented_list''</code> The indented list of article names.
#** In the {{tt|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.
#*
#* After the article name <code>~~</code> may be used to set article title. Row and column headers hyperlink to the articles if titles are specified they are used instead.
#*
==Examples==
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.
▲# The name of the matrix. Appears in the upper left cell. Arbitrary wiki formatting (even images) are possible.
▲#* source items must start in column 1
▲#* target items must be indented by at least one space
▲#* 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 joined (added).
'''Example 1:'''
{{#lsth:Examples/Module: dplmatrix (example 1)|Example}}
{{ViewTest|Examples|Module: dplmatrix (example 1)}}
'''Result:'''
{{#lsth:Examples/Module: dplmatrix (example 1)|Result}}
'''Example 2:'''
{{#lsth:Examples/Module: dplmatrix (example 2)|Example}}
{{ViewTest|Examples|Module: dplmatrix (example 2)}}
'''Result:'''
{{#lsth:Examples/Module: dplmatrix (example 2)|Result}}
'''Example 3:'''
{{#lsth:Examples/Module: dplmatrix (example 3)|Example}}
{{ViewTest|Examples|Module: dplmatrix (example 3)}}
'''Result:'''
{{#lsth:Examples/Module: dplmatrix (example 3)|Result}}
==Notes==
{{#lsth:Examples/Module: dplmatrix (example 3)|Notes}}<!--
-->
==Template content==
{{#lsth:Examples/Module: dplmatrix (example 3)|Template content}}
[[Category:Other Modules]]
|
Latest revision as of 07:17, 11 April 2023
|
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
{{#dplmatrix: name | yes | no | mode | indented_list }}
where:
name
– The desired name of the matrix. Appears in the upper left cell. Arbitrary wiki formatting, even images, are possible.yes
– The desired text/symbol indicating a link – (default is x).no
– The desired text/symbol indicating the absence of a link – (default is empty).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)
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).
- Source articles must start in column 1.
Examples
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
{{#lsth:Examples/Module: dplmatrix (example 3)|Notes}}
Template content
{{#lsth:Examples/Module: dplmatrix (example 3)|Template content}}