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

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
m (FrozenPlum moved page Controlling output format/Parameter: table (example 2) to Controlling output format/Parameter: table (example 3) without leaving a redirect: forgot this would be bumped back yet another number)
imported>FrozenPlum
m (Down to 2 results)
Line 13: Line 13:
|include = {Fruit-Infobox}.templatevalues
|include = {Fruit-Infobox}.templatevalues
|table = class="wikitable sortable",Page,Grows,Image
|table = class="wikitable sortable",Page,Grows,Image
|count = 5
|count = 2
}}
}}
</pre>
</pre>
Line 23: Line 23:
|include = {Fruit-Infobox}.templatevalues
|include = {Fruit-Infobox}.templatevalues
|table = class="wikitable sortable",Page,Grows,Image
|table = class="wikitable sortable",Page,Grows,Image
|count = 5
|count = 2
}}
}}



Revision as of 05:46, 16 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 selects articles in Category:Fruit examples and uses a surrogate template to format the second and third columns of results (the first column is automatically generated and populated by DPL3 because the second table value doesn't contain - to intentionally omit this, instead it contains the first column's table header "Page", and then sets the rest of the table headers. If - was in second position for table, the first column would drop off and the page name would need to be added to the first row of the surrogate template, it could be called with {{{%PAGE%}}} and formatted.

{{#dpl:
|category   = Fruit examples
|include    = {Fruit-Infobox}.templatevalues
|table      = class="wikitable sortable",Page,Grows,Image
|count      = 2
}}

Result

{{#dpl: |category = Fruit examples |include = {Fruit-Infobox}.templatevalues |table = class="wikitable sortable",Page,Grows,Image |count = 2 }}