Examples/Parameter: format (example 1): Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
mNo edit summary
imported>FrozenPlum
m (Forgot to adjust to optimal page/title example)
Line 10: Line 10:
<pre>
<pre>
{{#dpl:
{{#dpl:
|titlematch = %ntries%
|titlematch = %ntries%
|nottitlematch = %f%
|nottitlematch = %f%
|includesubpages = false
|includesubpages = false
Line 18: Line 18:
<pre>
<pre>
{{#dpl:
{{#dpl:
|titlematch = %ntries%
|titlematch = %ntries%
|nottitlematch = %f%
|nottitlematch = %f%
|includesubpages = false
|includesubpages = false
|format = ,\n* [[%PAGE%]],,
|format = ,\n* [[%PAGE%|%TITLE%]],,
|count = 3
|count = 3
}}
}}
Line 37: Line 37:
|nottitlematch = %f%
|nottitlematch = %f%
|includesubpages = false
|includesubpages = false
|format = ,\n* [[%PAGE%]],,
|format = ,\n* [[%PAGE%|%TITLE%]],,
|count = 3
|count = 3
}}
}}

Revision as of 06:09, 23 April 2022

Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

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%|%TITLE%]],,
|count           = 3
}}

Result

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


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