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

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
m (Simplify)
imported>FrozenPlum
m (Minor tweak to spacing and wording in consideration to the other page I'm working on)
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>{{DPL|listseparators}}</code> statement, to prevent the page name from being repeated in every subsequent line. The second and third column, formatted in the surrogate, creates a link to the page's parameter name section, and then display the "purpose" text using [[mw:Help:Extension:ParserFunctions|Parser Functions]]. This combination of format and surrogate template is advanced use, 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 see <code>{{DPL|table}}</code> and <code>{{DPL|tablerow}}</code>for other information about formatting in tables.
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. The second and third column, formatted in the surrogate, creates a link to the page's parameter name section, and then display the "purpose" text using [[mw:Help:Extension:ParserFunctions|Parser Functions]]. This combination of format and surrogate template is advanced, for more simple examples of surrogate template use see the [[Controlling output volume#include contents related to templates|include]] parameter as related to including contents from templates, and see <code>{{DPL|table}}</code> and <code>{{DPL|tablerow}}</code>for other information about formatting in tables.


<pre>
<pre>
Line 12: Line 12:
|category = Primary Module
|category = Primary Module
|nottitlematch = %volume%¦%page selection%
|nottitlematch = %volume%¦%page selection%
|uses = Template:DPL Parameter
|uses = Template:DPL Parameter
|include = {dpl manual}:,{DPL parameter}.surrogateexample
|include = {dpl manual}:,{DPL parameter}.surrogateexample
|mode = userformat
|mode = userformat
|listseparators = ¶{¦class="wikitable sortable" ¶!colspan=3¦Includes a phantom template¶¦-¶!Page ¶!Name ¶!Purpose,¶¦-¶¦[[%PAGE%]]¶,¶¦-¶¦class="dpl-dark-background" colspan=3¦,¶¦}
|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"¦,
|secseparators = ,¶¦class="dpl-orange-background"¦,
Line 25: Line 25:
|category = Primary Module
|category = Primary Module
|nottitlematch = %volume%¦%page selection%
|nottitlematch = %volume%¦%page selection%
|uses = Template:DPL Parameter
|uses = Template:DPL Parameter
|include = {dpl manual}:,{DPL parameter}.surrogateexample
|include = {dpl manual}:,{DPL parameter}.surrogateexample
|mode = userformat
|mode = userformat
|listseparators = ¶{¦class="wikitable sortable" ¶!colspan=3¦Includes a phantom template¶¦-¶!Page ¶!Name ¶!Purpose,¶¦-¶¦[[%PAGE%]]¶,¶¦-¶¦class="dpl-dark-background" colspan=3¦,¶¦}
|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"¦,
|secseparators = ,¶¦class="dpl-orange-background"¦,

Revision as of 05:45, 13 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. The second and third column, formatted in the surrogate, creates a link to the page's parameter name section, and then display the "purpose" text using Parser Functions. This combination of format and surrogate template is advanced, for more simple examples of surrogate template use see the include parameter as related to including contents from templates, and see table and tablerowfor other information about formatting in tables.

{{#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"¦ }}