Jump to content

Template:DPL Code

From DynamicPageList4 Manual
Template documentation
Note: portions of the template sample may not be visible without values provided.
View or edit this template's documentation (edit) (about template documentation).
View this template's CSS styles (edit).


Example(s)

[edit source]
{{DPL Code|<nowiki>
{{#dpl:
|debug       = 5
|category    = Fruit examples
|ordermethod = size
|addpagesize = true
|count       = 3
|noresultsheader = Some text
}}
</nowiki>}}




Code
{{#dpl:
|debug       = 5
|category    = Fruit examples
|ordermethod = size
|addpagesize = true
|count       = 3
|noresultsheader = Some text
}}
Result
<ul><li>[[Plum|Plum]] [134 bytes]</li><li>[[Mango|Mango]] [153 bytes]</li><li>[[Orange|Orange]] [234 bytes]</li></ul>

Test cases

[edit source]

Code
{{#dpl:
|debug = 5
|category         = Fake category
|count = 5
|noresultsheader = \n''No pages found''
}}
Result
''No pages found''

No Result

[edit source]
The following
{{DPL Code|
{{#dpl:
|debug = 5
|category         = Fake category
|count = 5
|noresultsheader = \n''No pages found''
}}
|noresult=y}}
Gives

Code
{{#dpl:
|debug = 5
|category         = Fake category
|count = 5
|noresultsheader = \n''No pages found''
}}


Template Data

[edit source]

Automatically puts a section of code into syntaxhighlight tags and inserts the "lang=wikitext" and "copy" attributes. The code is also unescaped and parsed by the parser. This way, the same source code does not need to be copy-pasted.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
11

Enter the content to wrap in syntaxhighlight tags.

Stringoptional
noresultnoresult

Specifying any value disables the "View result" button.

Booleanoptional


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