Examples/Parameter: multisecseparators (example 3): Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
(This example is a bit complex for an introduction to formatting, so, also link to the include statement where I can put a simplified example related directly to including contents related to templates (and using a surrogate).)
 
imported>FrozenPlum
m (Some adjustments to the explanation)
Line 6: Line 6:
==Example==
==Example==


This example contains all the same elements as the prior examples, only it uses a [[Template:DPL parameter.surrogateexample|surrogate/phantom template]] to format the second and third column of results. The first column is included in the <code>listseparators</code> statement, to prevent the page name from being repeated in every subsequent line. This is a bit of an advanced use of a surrogate template and the format statement. For a more simple example of surrogate template use, see the [[Controlling output volume#include contents related to templates|include]] parameter, for including contents related to templates, using a surrogate template.
This example contains all the same elements as the prior examples, only it uses a [[Template:DPL parameter.surrogateexample|surrogate/phantom template]] to format the second and third column of results. The first column is included in the <code>{{DPL|listseparators}}</code> statement, to prevent the page name from being repeated in every subsequent line. This is advanced use of a surrogate template in combination with the format statement. For more simple examples of surrogate template use, see the [[Controlling output volume#include contents related to templates|include]] parameter as related to included contents from templates, and for information about tables see also the <code>{{DPL|table}}</code> and <code>{{DPL|tablerow}}</code> parameters.
<pre>
<pre>
{{#dpl:
{{#dpl:

Revision as of 17:29, 11 April 2022

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 example contains all the same elements as the prior examples, only it uses a surrogate/phantom template to format the second and third column of results. The first column is included in the listseparators statement, to prevent the page name from being repeated in every subsequent line. This is advanced use of a surrogate template in combination with the format statement. For more simple examples of surrogate template use, see the include parameter as related to included contents from templates, and for information about tables see also the table and tablerow parameters.

{{#dpl:
|category           = Primary Module
|nottitlematch	    = %volume%¦%page selection%
|uses		        = Template:DPL Parameter
|include	        = {dpl manual}:,{DPL parameter}.surrogateexample
|mode		        = userformat
|listseparators     = ¶{¦class="wikitable sortable" ¶!colspan=3¦Includes a phantom template¶¦-¶!Page ¶!Name ¶!Purpose,¶¦-¶¦[[%PAGE%]]¶,¶¦-¶¦class="dpl-dark-background" colspan=3¦,¶¦}
|secseparators      = ,¶¦class="dpl-orange-background"¦,
|multisecseparators = ,¶¦-¶¦¶¦class="dpl-blue-background"¦
}}

Result

{{#dpl: |category = Primary Module |nottitlematch = %volume%¦%page selection% |uses = Template:DPL Parameter |include = {dpl manual}:,{DPL parameter}.surrogateexample |mode = userformat |listseparators = ¶{¦class="wikitable sortable" ¶!colspan=3¦Includes a phantom template¶¦-¶!Page ¶!Name ¶!Purpose,¶¦-¶¦%PAGE%¶,¶¦-¶¦class="dpl-dark-background" colspan=3¦,¶¦} |secseparators = ,¶¦class="dpl-orange-background"¦, |multisecseparators = ,¶¦-¶¦¶¦class="dpl-blue-background"¦ }}