Examples/Parameter: title (example 2)

From DynamicPageList3 Manual
Revision as of 09:02, 22 April 2022 by imported>FrozenPlum (Adapt this to a different use, it was not really appropriate to have on the page selection page (too complex, and that page describes entirely different use, this is more suited to the include page, though I may still leave it as "criteria for page selection" and/or "title" (I haven't decided yet).)
Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

This will select the Apple article, which uses Template:Color on its page more than once. The include statement both includes all parameters available in Template:Color, and it passes their values to a surrogate template, Template:Color.templatevalues for formatting. The use of title is unique, it implicitly sets mode=userformat, which allows additional control over the output, and allows secseparators to be used. The first argument of secseparators sets nothing , to be displayed before each result, then its second argument sets a line break \n and four hyphens ---- (which create a horizontal rule/line). Another line break \n puts each result below that line. Without the secseparators statement, each result would appear side by side instead.

{{#dpl:
|title=Apple
|include={Color}.templatevalues
|secseparators=,\n----\n
}}

Result

{{#dpl: |title=Apple |include={Color}.templatevalues |secseparators=,\n----\n }}