User:FrozenPlum/Sandbox

From DynamicPageList3 Manual

Last Edits Example

{{#dpl:

|ordermethod=lastedit
|order=descending
|addeditdate=true
|adduser=true
|addpagesize=true
|mode=userformat
|titlematch=%
|lastrevisionbefore=3000
|listseparators=¶{¦class="wikitable sortable" ¶!Namespace ¶!Script ¶!Last ¶!By ¶!Size,¶¦-¶¦style="background:#e1f5fa;"¦%NAMESPACE% ¶¦%PAGE%¶¦%DATE%¶¦%USER%¶¦%SIZE%,¶,¶¦}
|secseparators=\n¦
|count=10

}}

Example

<dpl>
category=Countries in Africa|Countries in United Kingdom
category=Part of NATO
</dpl>

 or

{{#dpl:
|category=Countries in Africa¦Countries in United Kingdom
|category=Part of NATO
}}

 or

{{#dpl:
|category=Countries in Africa{{!}}Countries in United Kingdom
|category=Part of NATO
}}

Result

{{#dpl: |category=Countries in Africa|Countries in United Kingdom |category=Part of NATO }}

format

Example

The classical default output of DPL, an unordered (bulleted) list, can be produced by using a default statement (first example and result). It can also be created using format with the following statements (last example and result). This selects pages that have "ntries" in the title, it excludes pages that have "f" in the title, and it also excludes subpages. The format statement's Startall, End, and Endall arguments are empty, only Start is used to manually define a bulleted list followed by the liked page name, which is then applied to each row of output.

{{#dpl:
|titlematch	     = %ntries%
|nottitlematch	 = %f%
|includesubpages = false
|count           = 3
}}
{{#dpl:
|titlematch	     = %ntries%
|nottitlematch	 = %f%
|includesubpages = false
|format	         = ,\n* [[%PAGE%]],,
|count           = 3
}}

Result

{{#dpl: |titlematch = %ntries% |nottitlematch = %f% |includesubpages = false |count = 3 }}


{{#dpl: |titlematch = %ntries% |nottitlematch = %f% |includesubpages = false |format = ,\n* %PAGE%,, |count = 3 }}

randomcount

Example

This will list from Category:Fruit examples, three random articles ordered by size. Each time the page is previewed or refreshed, the results may randomly change.

{{#dpl:
|category=Fruit examples
|randomcount=3
|ordermethod=size
|count=7
}}

Result

{{#dpl: |category=Fruit examples |randomcount=3 |ordermethod=size |count=7 }}