Jump to content

Examples/Parameter: table (example 1)

From DynamicPageList4 Manual
Revision as of 18:51, 6 September 2025 by FrozenPlum (talk | contribs) (Swapped to {DPL Code} template and cleaned up description.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 lists pages in category Fruit examples, and includes from the {{Fruit-Infobox}} template's the "grows" and "image" parameter values in the output. DPL automatically creates the first column linked to the page (unless suppressed with - in the table statement), so the parameter values appear in the second and third columns respectively. The table statement sets the table styles and headers, and the count is limited to 3.

Code
{{#dpl:
|category = Fruit examples
|include  = {Fruit-Infobox}:grows:image
|table    = class="wikitable sortable",Page,Grows,Image
|count    = 3
}}
Result
Page Grows Image
Apple On trees Red Apple Fruit With Black Background.jpeg
Apricot On trees Apricot_whole444.jpg
Banana On a tree-like plant Banana-Single.jpg
Cookies help us deliver our services. By using our services, you agree to our use of cookies.