Examples/Parameter: table (example 1)
Appearance
< Examples
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 |