Examples/Module: dplmatrix (example 1): Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(Move example, this is a hard one to describe what's going on, might take multiple edits)
 
imported>FrozenPlum
mNo edit summary
 
Line 5: Line 5:
-->
-->
==Example==
==Example==
This uses the {{DPL|dplmatrix|#dplmatrix}} module to create a matrix, whose name is set to "Title". The second, third, and fourth values are left blank so each one defaults: the second defaults to <code>x</code> (indicating a link/marker), the third defaults to <code></code>&nbsp;([blank], which indicates '''no''' link/marker), and the forth defaults to <code>normal</code> (the matrix layout mode).
This uses the {{DPL|dplmatrix|#dplmatrix}} module to create a matrix, whose name is set to "Title". The second, third, and fourth values are left blank so each one defaults: the second defaults to ''<code>x</code>'' (indicating a link), the third defaults to <code></code>&nbsp;([blank], which indicates '''no''' link), and the forth defaults to ''<code>normal</code>'' (the matrix layout mode).


The fifth parameter specifies the indented list contents. First listed (non-indented, as row title) are article names as the ''source'', and then the (indented) article names as the ''targets''. From this, DPL3 determines which target is listed under which source. For example, the "apple" article appears in both the "one" and "Two" source sections of the indented list provided, so they are each marked with an "x" by DPL3 in the corresponding table column and row.
The fifth parameter specifies the indented list contents. First listed (non-indented, as row title) are article names as the ''source'', and then the (indented) article names as the ''targets''. From this, DPL3 determines which target is listed under which source. For example, the "apple" article appears in both the "one" and "Two" source sections of the indented list provided, so they are each marked with an "x" by DPL3 in the corresponding table column and row.

Latest revision as of 05:20, 11 April 2023

Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

This uses the #dplmatrix module to create a matrix, whose name is set to "Title". The second, third, and fourth values are left blank so each one defaults: the second defaults to x (indicating a link), the third defaults to  ([blank], which indicates no link), and the forth defaults to normal (the matrix layout mode).

The fifth parameter specifies the indented list contents. First listed (non-indented, as row title) are article names as the source, and then the (indented) article names as the targets. From this, DPL3 determines which target is listed under which source. For example, the "apple" article appears in both the "one" and "Two" source sections of the indented list provided, so they are each marked with an "x" by DPL3 in the corresponding table column and row.

{{#dplmatrix: Title||||
one
 apple
 apricot
two ~~ Two
 banana
 apple
three
four
 grape
 mango ~~ MANGO
two ~~ Two
   mango ~~ MANGO
}}

Result

{{#dplmatrix: Title|||| one

apple
apricot

two ~~ Two

banana
apple

three four

grape
mango ~~ MANGO

two ~~ Two

  mango ~~ MANGO

}}