Examples/Parameter: title (example 2)
Example
[edit source]
This selects pages with the title Apple (only that page), which uses the {{Color}} template on its page more than once. The include statement both includes all parameters available, and it passes their values to the specified surrogate {{Color.templatevalues}} formatting template. As the title parameter implicitly sets mode=userformat, which allows additional control over output usng the secseparators statement (an alias for format).
format=Startall,Start,End,Endall where Startall, Start, End and Endall are wiki tags used to separate the list items:
Startallbefore all — e.g., may specify wikitext to begin a table (including headers).Startbefore each — e.g., may specify wikitext to begin row, its cell and cell content.Endafter each — e.g., may specify content to end a cell or row.Endallafter all — e.g., may specify content to end a table.
|debug = 5 can be added to view any resultant wikitext given, and should always be put at the top of the statement, a value of 0 disables it.
The first argument of secseparators sets nothing , is displayed before all, then its second argument sets a line break \n and four hyphens ---- (which create a horizontal rule/line) before each result. Another line break \n puts each result below the next. If the secseparators line is removed, results appears side by side instead.
- Code
{{#dpl:
|title = Apple
|include = {Color}.templatevalues
|secseparators = ,\n----\n
}}
- Result
red
green