Examples/Parameter: distinct (example 1)
Appearance
< Examples
Example
[edit source]This lists any page with a titlematch of Apple, that uses Template:Color, and then include ensures the page name (automatic) and 1 (first parameter value) of the template is displayed in the output. The table statement formats the results as a simple table. The distinct parameter when set to true typically ensures each page is only displayed once in the output. The result count is restricted to 5 results.
- Code
{{#dpl:
|titlematch = Apple
|uses = Template:Color
|include = {color}:1
|table = class="wikitable", Page, Color
|distinct = true
|count = 5
}}
- Result
| Page | Color |
|---|---|
| Apple | red |
| Apple | green |