Other parameters

debug
Syntax:

, where n is one of:
 * – Silent mode, shows nothing.
 * – Quiet mode, shows (fatal) errors.
 * – Default mode, like 1 + shows warnings; – (default).
 * – Verbose mode, like 2.
 * – Dump raw SQL Query; only if $wgDebugDumpSql is set to true.
 * – Show wiki text output from DPL3 instead of parsed wiki text.

If the debug parameter is used, but not in first position in the DPL3 element, the new debug settings are not applied before all previous parameters have been parsed and checked. This generates a warning for  and above.

Example:

Notes:
 * DPL3 debug messages are translatable in DynamicPageList2.i18n.php.
 * suppresses warning messages (e.g., if the result set of a DPL3 query is empty). As an alternative, the  statement can be used.

allowcachedresults
Syntax:

where value is one of:
 * – (default, need not be set)
 * – prevent caching

All queries are cached by default to reduce server load, as generally articles do not change often enough to require updating every page load. If immediate updates are required every page load, then set this parameter to false. Cache period is handled by the  parameter.

cacheperiod
Syntax:

– (default is 3600, meaning 1 hour).

goal
Syntax:

where goaltype can be one of:
 * – (default, need not be set)

DPL3 produces a list of pages by default, and this is precisely what the name DPL3 promises.

If the goal parameter is set to 'categories' the list of pages is still be produced, but is not seen. Instead, it is used to calculate a unique ordered list of all categories these pages belong to.

This allows the asking of question like: Given all pages that are a member of category X with a title matching "y%" and which use template "Z": to which categories do these pages belong?

One of the more useful applications would be a question like: "To which categories do the pages belong which contain a reference to the current page?"

The output of  is technically a list of pages of type category. This means that all DPL3 formatting options can be used (, ,   etc.) and pseudo variables  to customize the layout of the report.

Technical Note:

Due to some limitations in MySQL, it is currently not possible to restrict the intermediate result set of pages to a certain maximum (using the LIMIT clause). In addition, the generated SQL code is not in all cases optimal (as its structure provides for complex selection criteria and therefore is unnecessarily complex in simple cases). So be careful and apply precise selection criteria.

eliminate
Syntax:

where keyword is one of:
 * – A synonym for all of the above.
 * – A synonym for all of the above.
 * – A synonym for all of the above.
 * – A synonym for all of the above.
 * – A synonym for all of the above.

The output of a DPL3 statement typically creates links to all pages which are part of the result set. The inclusion of contents from other pages via DPL3 (using ) normally has these consequences:
 * The page containing the DPL3 query becomes part of the categories of the transcluded page
 * It shares ('adopts') their use of templates.
 * It shares their references to images.
 * It shares their references to other articles.

In some cases, this may be useful. But in many cases, this is not wanted. Especially when DPL3 is used to create a printable document which contains the full text of other articles, duplicating all links, template uses etc., of those articles is probably undesired.

The  parameter suppresses all or some of the effects described above.

For further explanation, see.

Note: The use of  needs a considerable amount of extra computing power as it performs a second parser step for each included document.

reset
Syntax:

, where keyword is one of:
 * – A synonym for all of the above.
 * – A synonym for all of the above.
 * – A synonym for all of the above.
 * – A synonym for all of the above.
 * – A synonym for all of the above.

The output of a DPL3 statement typically creates links to all pages which are part of the result set. The inclusion of contents from other pages via DPL3 (using ) normally has the consequences:
 * The page containing the DPL3 query becomes part of the categories of the transcluded page.
 * It shares ('adopts') their use of templates
 * It shares their references to images
 * It shares their references to other articles.

In some cases, this may be useful. But in many cases, this is not wanted. Especially when DPL3 is used to create a printable document which contains the full text of other articles, duplicating all links, template uses etc., of those articles is probably undesired.

The  parameter suppresses all or some of the effects described above.

There are some subtle differences here depending on the mode in which DPL3 is used. These differences affect the question of how links, and categories etc., are treated which are direct part of the document containing the DPL3 query. Example: linking to Q Link and showing and using ... DPL3 query which includes contents from other articles. assuming that this contents contains links and images, that it uses templates and that the articles are part of one or more categories RESET statement at the end of the DPL3 query with one or more of 'categories,templates,images,links' ...

In parser extension mode (tag like ):
 * – Ignores categories of included contents but keeps 'own' categories like 'Q Cat'.
 * – Throws away references to images contained in included contents but keeps 'own' images like 'Q Image'.
 * – Ignores templates used in included contents but keeps 'own' template usage ('Q Template').
 * – Throws away all references to other pages, i.e., links contained in included contents and links like 'Q Link' are ignored. This means all links can be used in the normal "FORWARD" way, but no "BACKLINKS" are available for them.

To avoid the above described effect of  on one's 'own' links,   can be used. However, it is important to note that eliminate is rather expensive in terms of computer power, as it does a second parse for all included contents.

 In parser function mode :
 * – Ignores all categories.
 * – Throws away all references to images.
 * – Ignores all template invocations.
 * – Throws away all references to other pages.

Using  in parser function mode clears everything, regardless of whether it comes from included contents or whether it is direct part of the document containing the DPL3 query.

To avoid the above described effect of,   can be used. However, eliminate is rather expensive in terms of computing power, as it does a second parse for all included contents. The extra parser step is conducted as soon eliminate is specified. In terms of extra processing needed, it does not make a difference whether one or more arguments are specified for the eliminate command.

If there is more than one DPL3 query in a page, the effects depend on the exact mode (parser extension or parser function mode), on the sequence of the statements and on the presence of 'reset' or 'eliminate' statements in each of the queries and on their individual arguments. As this is a very rare case, only a simple rule of thumb is given here: Once 'reset' is used in parser function mode or  in parser extension mode, the effect of these statements dominates the rest.

fixcategory
Syntax:

Use multiple commands to assign the article to more than one category.

If  or   are used, the article containing the DPL3 statement is not be recorded in the MediaWiki link database. This may be quite useful if an article transcludes content from other pages. Without the  command, the article would appear in a category if a text portion containing an assignment to that category was used.

As a side effect of using, the article does not appear in a category even if one is literally assigned to it. allows a category assignment to be made which is not blocked by the  command.

execandexit
Syntax:

or

If no wiki text is given, the command is ignored. Otherwise, DPL3 outputs the wiki text and exits immediately. Note that the wiki text may be a parser function call which evaluates to an empty string.

The special word geturlargs can be used as a wiki text to transform URL arguments starting with  into variables, which can then be accessed via #var (if the Variables extension is installed) or via #dplvar.

Using this command, DPL3 can be prevented from executing a database query; this may be useful if the user did not give a necessary parameter. Note that an  (Parser Functions extension) function call would NOT help in that case because   evaluates its complete content before taking the "if" or the "else" path. So, embedding a DPL3 call within an  is much less efficient than using the execandexit function.

A typical use would look like this (note the double pipe symbols within the #if. Calling the following page with &DPL_cat=Country would list countries, omitting the  parameter would trigger the error text message (without DPL3 going to the database):

See also: Template:Extension DPL scroll and.

Note:  acts like a short-circuit evaluation. This means, for example, that successive statements to influence caching behavior (like ) are not interpreted.

updaterules
Syntax:

updaterules= rule; ...    rule;

Where rule is one of the following:
 * 1) Rules for batch update of articles
 * 2) * A DPL3 query can select a group of articles and perform updates, like inserting a piece of text at a certain position, or changing text portions based on regular expressions.

replace pattern; by    replacement; before pattern; insert text; after  pattern; insert text;  Rules for interactive update of articles 
 * For interactive form-based editing of template values.

template template name; legend   legend article name; table    table format; editform form parameters; action   form action; hidden   value; submit   submit button; commit   commit button; parameter parameter name; value    value; format   display format; tooltip  text; optional value; afterparm parameter name;

 Common rules 
 * Common to both other groups (batch update or interactive update of articles) and controls the update process.

summary edit summary text; exec   value;

replace pattern;
Defines a regular expression which matches text portions that shall be replaced. It is in the responsibility of the user to provide enclosing characters for the regexp; modifiers line 'U' or 'm' can be used.

by replacement;
Defines the replacement for the above pattern; back references like \1 can be used.

before pattern;
Defines locations where text will be inserted. The location(s) are immediately before the match(es) of the pattern. If a pattern matches multiple times, multiple inserts are performed.

The regexp will implicitly be enclosed in slashes. Hence, literal slash characters must be escaped by backslashes.

after pattern;
Defines locations where text will be inserted. The location(s) are immediately after the match(es) of the pattern. If a pattern matches multiple times, multiple inserts are performed.

The regexp will implicitly be enclosed in slashes. Hence, literal slash characters must be escaped by backslashes.

insert text;
Defines the text to be inserted.

A DPL3 statement may contain replacement, insertion, before, and after at the same time. replace /([a-z]+])-cat/; by     \1-dog; before foo; insert bar; after  foo; insert bar2;

Only one  -   sequence, one insertion   and one insertion   can be specified. is always executed first, followed by  and , regardless of the sequence in which the rules appear in the DPL3 source text.

template template name;
The name of the template; the prefix "Template:" must be given.

The location(s) are immediately before the match(es) of the pattern. If a pattern matches multiple times, multiple inserts are performed.

The regexp will implicitly be enclosed in slashes. Hence, literal slash characters must be escaped by backslashes.

A regular expression: after  pattern; insert text; replace pattern; by     replacement;

For safety reasons, the update statements are only performed if "exec yes" is specified. So, leaving this away, what would happen if the update were to be executed can be checked.

Note that if "exec yes" is present, the update is performed each time the page is rendered which contains the DPL3 statement with the. So, it is advisable to set "exec yes" only via a command line argument and not as part of the static article text. Thus, staying in control when the update happens. Typically, one would use a URL parameter like DPL_arg1 for that purpose.

The size of the form fields adapts to the size of the displayed content.

text is plain text; replacement is text which may contain references (like \1) to the matching pattern (provided that this pattern contains match groups).

deleterules
deleterules= reason text; exec  true;

This command is experimental at the moment.

This deletes the selected pages; If "exec true" is missing, nothing happens.