Help:DPL

From AIOWiki
Jump to navigation Jump to search
Manual

DynamicPageList3 (DPL/DPL3) is a powerful MediaWiki extension that can generate lists of pages, and/or certain data and statistics gathered from them, for display in a wiki page. DPL lists are automatically updated whenever said data changes.

As a basic example, DPL can be used to insert, in a wiki page, an always-current list of all pages of a particular category. The data displayed may be selected and sorted based on factors like author, namespace, date, name pattern, usage of templates, or references to other articles, with a variety of custom formatting possibilities.

This page and its subpages are the DynamicPageList3 (DPL) Manual. This version of the DPL Manual was imported from the Gamepedia Help Wiki (which apparently adapted it from FollowTheScore). The DPL Manual on the Gamepedia Help Wiki has since migrated to the Fandom Community Central. Because of needed changes, the pages imported have been edited. For a list of all changes, see AIOWiki:DPL Manual.

Usage

Primary DPL module

These sections contain documentation on DPL's primary module, {{#dpl: ... }}. This is the DPL functionality used most often, and has a wide range of powerful coding options.

Complete DPL Manual Table of Contents

Below is the legacy Table of Contents provided as navigation in the original DPL documentation. It is an expansive, cross-referenced list of DPL parameters (which some find daunting and others find helpful). Its links can all be found via the pages listed above, however the table below may be useful to more easily find what you need, especially if you don't know which section your desired functionality might be located in (expand the table below and use your browser's Find In Page feature, usually Ctrl-F).

Information.png
Click to reveal or hide legacy DPL Manual Table of Contents
Controlling output volume
name purpose
resultsheader output a headline if there is at least one article to display.
resultsfooter output a summary 'footline' if there is at least one article to display.
oneresultheader output a headline if there is exactly one article to display.
oneresultfooter output a footline if there is exactly one article to display.
noresultsheader output a headline if there is no article to display (empty result).
suppresserrors suppress the warning message if no matching article was found.
noresultsfooter output a footline if there is no article to display (empty result).
addcategories Shows all categories to which an article belongs as a small text line after the article name.
addpagecounter Shows number of times the page has been viewed according to the definition of the 'page_counter' field on Page_table.
addpagesize Shows the size of the page.
addcontribution shows how much a user contributed to an article.
adduser Requires ordermethod=[...,]firstedit or ordermethod=[...,]lastedit (where the [...,] signifies a complex ordermethod with extra parameters). If firstedit (lastedit), 'adduser=true' displays the user who made the first (last) revision of the page. In this way the parameter is equivelent to the addauthor (addlasteditor) parameter (see below).
addauthor show the user who created the article
addlasteditor show the user who edited the most recent revision of a page
addpagetoucheddate Shows date/time of last change to the page according to the definition of the 'page_touched' field on Page_table.

Requires ordermethod=[...,]pagetouched or ordermethod=[...,]title. ([...,] means complex ordermethods with extra param before are allowed.)

addeditdate Requires ordermethod=[...,]firstedit or ordermethod=[...,]lastedit. ([...,] means complex ordermethods with extra param before firstedit
addexternallink add the URL of an external link to the output list.
addfirstcategorydate Shows the date/time the article got added to one of the listed include categories. If there are more than one categories listed and an article belongs to more than one of them, the result is ambiguous.

From a logical point of view it is recommended to include one category only with 'category' parameter or to make sure that each of the article in the result belongs to only one of the categories listed. Conflicts with other "add*date" (addeditdate, etc.) parameters to avoid confusion.

showcurid page links will contain the current page id
include include pages (whole content) or include certain sections of articles or template parameters.

This functionality is based on the ideas and work of Steve Sanbeg and his extension Labeled Section Transclusion. DPL comes with a modified version of Sanbeg´s source, so there is no need for additional installation.

includepage this can be used as a longer name for include.
includemaxlength Delimit the size of an included article to a maximum of [n] characters of wiki source text or less.

Care is taken to respect pairs of braces and brackets as far as possible. Otherwise we might confuse the result by half-cut syntax elements of transcluded sections. Therefore the output might be shorter or even larger than [n] characters.

includetrim removes all leading and trailing whitespace from transcluded contents.


Other DPL modules

These sections detail some additional functions provided by the DPL extension.

Notes

Examples

Selecting articles

Show article's context or contents

Controlling output