Jump to content

Examples/Module: dplmatrix (example 2)

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

Example

[edit source]

This uses the #dplmatrix module to create a matrix, whose first parameter (name) is set to "Page". The second parameter is set to (indicating a link/marker), the third is set to . (indicating no link/marker), and the fourth is set to flip (the matrix layout mode) to flip what is in normal column position to rows instead.

The fifth parameter specifies the indented list contents. Since the mode is flipped, the first items listed (non-indented, as column titles) are article names as the source, and then the (indented) article names as the row title targets. From this, DPL4 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 DPL4 in the corresponding table column and row.

{{#dplmatrix:Page|✓|.|flip|
one
 apple
 apricot
two ~~ Two
 banana
 apple
three
four
 grape
 mango ~~ MANGO
two ~~ Two
   mango ~~ MANGO
}}

Result

[edit source]
Page apple apricot banana grape MANGO
apple . . .
apricot . . .
banana . . . .
grape . . .
MANGO . .
Cookies help us deliver our services. By using our services, you agree to our use of cookies.