Controlling output volume

By default, DynamicPageList3 shows the name of each article, including its namespace in the result set as a link to the article. By setting the volume control parameters of DPL3, it is possible to:


 * Specify a header/footer to show when results are found or not found.
 * Add metadata (size, author, last edited by, date of last change, etc.) to the output.
 * Include contents from articles.
 * Show the number of articles in the result set.
 * Cut off the articles' content at a certain length.
 * Add access date (frequency, date of last access).
 * Add the articles' contents or parts of it.

resultsheader
Syntax:

Example:

Result:

Notes:
 * The symbol  or   is converted to a newline symbol. This is useful if you want to use wiki markup that needs to start at the beginning of a line (if the wiki parser requires a linefeed to understand your wikitext).
 * If  is specified as well, the latter is used in case there is exactly one entry in the DPL3 result set.   is only used if there are two or more entries in the result set.
 * The symbol  or   is converted to a newline symbol. This is useful if you want to use wiki markup that needs to start at the beginning of a line (if the wiki parser requires a linefeed to understand your wikitext).
 * If  is specified as well, the latter is used in case there is exactly one entry in the DPL3 result set.   is only used if there are two or more entries in the result set.
 * If  is specified as well, the latter is used in case there is exactly one entry in the DPL3 result set.   is only used if there are two or more entries in the result set.

resultsfooter
Syntax:

Example:

Result:

Notes:
 * The symbol  or   is converted to a newline symbol. This is useful if you want to use wiki markup that needs to start at the beginning of a line (if the wiki parser requires a linefeed to understand your wikitext).
 * If  is specified as well, the latter is used in case there is exactly one entry in the DPL3 result set.   is only used if there are two or more entries in the result set.
 * The symbol  or   is converted to a newline symbol. This is useful if you want to use wiki markup that needs to start at the beginning of a line (if the wiki parser requires a linefeed to understand your wikitext).
 * If  is specified as well, the latter is used in case there is exactly one entry in the DPL3 result set.   is only used if there are two or more entries in the result set.
 * If  is specified as well, the latter is used in case there is exactly one entry in the DPL3 result set.   is only used if there are two or more entries in the result set.

oneresultheader
Syntax:

Notes:
 * The symbol  or   is converted to a newline symbol. You may need this if the wiki parser requires a linefeed to understand your wikitext.
 * is replaced by the current DPL3 version. This is useful if you want to use wiki markup, which needs to start at the beginning of a line.

oneresultfooter
Syntax:

Notes:
 * The symbol  or   is converted to a newline symbol. You may need this if the wiki parser requires a linefeed to understand your wikitext.
 * is replaced by the current DPL3 version. This is useful if you want to use wiki markup, which needs to start at the beginning of a line.

noresultsheader
Syntax:

Example:

Result: Notes:
 * Setting a single blank or newline character ( or  ) suppresses the warning message from DPL3 that is normally issued if no articles are found.
 * The symbol  or   is converted to a newline symbol. You may need this if the wiki parser requires a linefeed to understand your wikitext.

suppresserrors (DEPRECATED)
This parameter is deprecated and is left in the code as a null parameter to give people time to remove it from their queries. It will be fully removed in a future release of DPL3.

Syntax:

Notes:
 * Setting  to true has the same effect as setting   to a single space character. The command is provided for downward compatibility reasons with older DPL versions.
 * See also:.

noresultsfooter
Syntax:

Note:  is essentially the same as. If there is no output to display, the difference between header and footer becomes incredibly marginal.

addcategories
Syntax:

Example:

Result:

Notes:
 * In  the category list can also be referenced using built-in   (pipe separated)   (bullet separated)   (comma separated).

addpagecounter
Example:

This would show the 3 most popular articles about dessert.

Note: in  the access counter can also be referenced as a built-in variable.

addpagesize
Example:

Result:

Note: in  the size can also be referenced as a built-in variable.

addcontribution
Syntax:

— (Default is false)

Using this parameter restricts the output to articles that were edited recently (this is usually one week or one month, according to the setup of the wiki).

A link to the contributor is provided and an "asterisk bar" appears indicating how many bytes in the article were changed by that user.

You will also have the built-in variables,   and   available to be used in your own  statement.

adduser
Syntax:

— (Default is false)

Example:

Result:

Note: If  the user can be referenced using the built-in variable.

addauthor
Syntax:

— (Default is false)

Example:

Result:

addlasteditor
Syntax:

— (Default is false)

Example:

Note: The same behavior can be achieved (and formatted) using:
 * and

addpagetoucheddate
Syntax:

— (Default is false)

Example:

Result:

Notes:
 * In  this date can also be referenced as a built-in variable.
 * The formatting of the date can be influenced using.
 * The date is translated to your local time zone (if defined in your preferences) or to the server's time zone.

addeditdate
Syntax:

— (Default is false)

Example:

Result:

Notes:
 * In  this date can also be referenced as a built-in variable.
 * The formatting of the date can be influenced using.
 * The date is translated to your local time zone (if defined in your preferences) or to the server's time zone.

addexternallink
Syntax:

— (Default is false)

Note: The command makes only sense in combination with.

addfirstcategorydate
Syntax:

— (Default is false)

Example:

Result:

Notes:
 * In  this date can also be referenced as a built-in variable.
 * The formatting of the date can be influenced using.
 * The date is translated to your local time zone (if defined in your preferences) or to the server's time zone.

showcurid
Syntax:

— (Default is false)

Example:

Result:

include
With  you can incorporate one or more of the following
 * The whole article as it is
 * A certain chapter -- identified by its headline
 * A certain chapter -- identified by its position (sequence number, regardless of level)
 * Parameter(s) used in template calls
 * The output of a surrogate template (phantom template) which is used instead of the original template
 * Pieces of text which are marked by special section markers

There is a close correlation between the output of the  statement and  and. You should understand those statements if you want to create tabular output from included content.

The syntax for this parameter is outlined in multiple sections below.

include whole article
Syntax:
 * — The character  functions as a wildcard.

Example:

Note: you can use  (where n is an integer) to restrict the included text to a portion of the article. The text is truncated in a way which does not spoil tag structures or nested brackets. A result is cut at a word boundary if possible.

include page sections (chapters)
Syntax:
 * — The character  is used as a prefix to the page section heading (chapter) name.

Specifying  includes text from 'heading1' (case-insensitive) until the next heading of the same or lower level.


 * Instead of the prefix,   can be used (the   may lead to problems in certain cases);   acts as a regexp comparison just as   does.
 * Normally a text pattern is compared literally and it must match the whole headline of the chapter. If a double hash  is used, however, the text is taken as a (case-insensitive) regular expression. It is automatically enclosed within slashes, and will refer to the headline as a whole (^regexp$). So, if only matching part of the text is desired,   must be added around the pattern. Correct regexp syntax must be provided; otherwise, runtime errors may be seen, no output received etc.
 * — This matches a page section name like "This is something old" or "That Was Something Old".

Example:

Result:

Notes:
 * This functionality is also available as a separate parser function (called ).
 * If there is no chapter with the specified heading, the output will be empty.
 * You can also limit the amount of text for each section displayed in the output, which automatically generates a link to view the rest of the content:
 * , where  is the number of characters to include, and   is the characters or text used as the link label.
 * If the remaining text is longer than the limit, it is cut and a link appears pointing directly to the chapter which was included.
 * When truncating included text portions, care is taken not to break words midway through, and not to spoil wiki syntax (i.e., maintain a symmetry of brackets and braces, make sure that nowiki and pre tags are balanced). Therefore, the size of the included text can deviate from what was specified.
 * Note that  can be used in   to fetch the section name, which may be useful to customize the text to include the (otherwise unseen) section name:
 * This variable is replaced by "article#heading" if used in . It is up to you to create a link from this text using normal wiki syntax if you wish.
 * This variable is replaced by "article#heading" if used in . It is up to you to create a link from this text using normal wiki syntax if you wish.


 * Add one or more optional filter expressions, a character limit and/or an optional link text in square brackets to shape the included portion of text : [filter 1~...~filter n~limit text].
 * The filters are applied before calculating the length of the text; they simply throw away the matching part of the contents.
 * If the remaining text is longer than the limit, it is cut and a link appears which points directly to the chapter which was included. Using "1" as a limit only shows the link (if the corresponding chapter in the article is not empty), "0" does not show anything, not even the link. When truncating included text portions care is taken not to spoil wiki syntax (i.e., maintain a symmetry of brackets and braces, make sure that nowiki and pre tags are balanced). Therefore, the size of the included text can deviate from what you specified.


 * include sections (chapters) by a reference to their position on-page

To include sections according to their position on the page, use a simple number with a  as prefix. includes the text BEFORE the first chapter,  includes the first chapter,   the sixth and so on. Chapters are counted regardless of their level. No nesting logic is applied. is a special value which refers to the last chapter of an article ( does not work, however). includes the first thirty characters of the second chapter. contains the heading of the selected chapter.

Example:

Result:

include contents related to templates
Syntax:
 * — The character  is used as a prefix to the page section heading name.

The the result of a template call can be included by specifying the template name within curly braces. So,  displays the result of the template call with the original parameters used on the selected article page.


 * You need a space char or a line break after this statement before ending the #dpl parser function call because otherwise the MW parser may be fooled by three successive closing curly braces.


 * MediaWiki treats spaces like underscores. Therefore, {my template} also matches a template invocation like.


 * MediaWiki searches for template calls in the template namespace. Specifying {my template} also matches a template invocation like.
 * Using a different namespace also works: {Xyz:my template} matches a template invocation in namespace Xyz. {:my template} matches a template invocation in the main namespace like.


 * You can include one or more parameters of a template call by specifying a list of names or position numbers separated by colons (and optional white space). Names are used for named parameters, numbers for positional parameters.
 * The following would include the values of the two parameters named 'age' and 'size' and the value of the first unnamed parameter in all calls of the template "animal":


 * It is even possible to use expressions which contain a  symbol as pseudo parameters:

Example:

Result:

Instead of listing parameter values, the output of one or more 'surrogate' templates can be included (also called 'phantom templates'). DPL3 calls the template(s) instead of the original, and allows the identical parameter list to be worked with (plus additional DPL3 parameters). The output of the surrogate template sets (and formats) one line of results, which is then applied to each subsequent result in the result set. To make this happen, the name of a template must be specified within single curly braces and a suffix added. Five additional DPL3 parameters are also passed to the template, and can be used within it:



Example:

Result:

Example:

Result:

Notes:
 * There is an alternate syntax to specify a surrogate template that has the advantage that the surrogate template may reside in a different namespace than the original template. Furthermore, the surrogate template's name can be wholly different from the original template name: . For example, you may specify something like.

include parser function calls
If a pattern like  is specified, DPL3 looks for calls of the parser function 'pfunc'. DPL3 passes the parameters of this parser function to a template, which must be provided under the name of 'Template:pfunc.list'. Instead of '.list' a desired suffix can be specified. The Template receives the parser function name as  and all parameters under their normal name or number. Instead of specifying a single parser function, a generic pattern can also be used.

Example:

Result:

Note: This function is not very robust. It cannot handle nested parser functions properly.

To find all parser functions,  can be used:


 * The  portion is treated like a regular expression.
 * The search itself is based on simple heuristics, so the output may not always be correct.

include parser extension (tag) calls
If a patter like  is specified, DPL3 looks for calls of the parser extension (tag) with the tag name &lt;func&gt;. DPL3 passes the body (all contents) of the tag (as-is, including line breaks) to a template, which must be provided under the name of 'Template:func.list'. Instead of '.list' another desired suffix can be used. The Template receives the parser extension (tag) function name as  and the body contentis named. Note that this function is not very robust, it cannot handle nested tags properly.

include specially labeled text portions
To include sections which are labeled with special tags, you just mention the tag name. Refer to Labeled Section Transclusion for details on how to label sections in your pages accordingly:



If the section name starts with  (asterisk), the asterisk is cut off and the rest of the text is taken as a regular expression. If the section name is  it matches all section names. In both cases, the tag name precedes the output, separated by.

Example:

Result:

include nothing
To include nothing from the page (no inclusion), leave blank (this is default):


 * A single  sign has the same effect; such a dummy parameter can be useful if you want to put content into columns of the output table which is not derived from the include statement

Combinations of the above possibilities
All of the above can be combined, you can even refer to the same template or heading more than once.



Example:

This would include:
 * A text portion named "foo" which is marked by special tags.
 * The contents of a page section named "bar"; only the first 200 characters of wiki text are shown; if the chapter is larger than that, a link with the text "..more.." points to the source.
 * The output of template "boo.dpl" being called with the same parameters that were used to call template "boo" in the original page.
 * See also.

includemaxlength
Syntax:

- where n is an integer.

Example:

Result:

includetrim
Syntax:

(default is false)

Note: This parameter is only useful in combination with.