Jump to content

Examples/Parameter: title (example 2)

From DynamicPageList3 Manual
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 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:
  • Startall before all — e.g., may specify wikitext to begin a table (including headers).
  • Start before each — e.g., may specify wikitext to begin row, its cell and cell content.
  • End after each — e.g., may specify content to end a cell or row.
  • Endall after all — e.g., may specify content to end a table.
Note: |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


Cookies help us deliver our services. By using our services, you agree to our use of cookies.