Template:DPL/doc

This template generates a dynamic page list (DPL), a list of all pages meeting some specified criteria, with optional parameters for substantially the full range of DPL options, and default values suited to Wikibooks.

Usage
The following parameters are supported. Each one is optional, but there must be either a cat, or a not, or namespace; and there's an upper limit on the total number of cats and nots (when last noted, the limit was six).
 * cat1, cat2, cat3, <tt>cat4</tt>, <tt>cat5</tt> &mdash; categories that a page must belong to in order to be listed. The more of these are specified, the fewer pages will qualify for the list.
 * <tt>not1</tt>, <tt>not2</tt>, <tt>not3</tt>, <tt>not4</tt>, <tt>not5</tt> &mdash; categories that a page must not belong to, in order to be listed. The more of these are specified, the fewer pages will qualify for the list.
 * <tt>namespace</tt> &mdash; namespace a page must belong to in order to be listed; to restrict to mainspace, use <tt>main</tt>.
 * <tt>stable</tt> &mdash; how to treat pages that have at least one sighted revision; <tt>include</tt> treats them no differently than any other page, <tt>only</tt> lists only sighted pages, and <tt>exclude</tt> lists only unsighted pages; the default is usually <tt>include</tt>, but if <tt>namespace</tt> specifies Wikijunior the default is <tt>only</tt>.
 * Note, the Wikijunior default <tt>stable=only</tt> is relied upon at Wikijunior to prevent listing of unvetted pages.
 * <tt>offset</tt> &mdash; integer number of pages to omit at the start of the list, default being zero.
 * <tt>count</tt> &mdash; integer number of pages to list, default being the maximum list length allowed by the extension (a setting in the extension).
 * If a specified count is larger than the maximum list length allowed by the extension, this template attempts to provide the requested length by piecing together multiple lists; see DPL/0.
 * <tt>showerrors</tt> &mdash; if non-blank, errors are reported (mainly, "There are no pages matching this query"); by default, errors produce no visible output.
 * <tt>full</tt> &mdash; if <tt>false</tt>, the namespace of pages is not shown (only the {{PAGENAME}} of each page is listed); if any other non-blank value, the namespace of pages is shown; default depends on whether parameter <tt>namespace</tt> is specified &mdash; if it is specified, default is <tt>false</tt>, otherwise default is <tt>true</tt>.
 * <tt>method</tt> &mdash; how the list is ordered; default is <tt>categorysortkey</tt>, alternatives are <tt>categoryadd</tt> (when pages were mostly recently added to the first category in the query) and <tt>lastedit</tt> (when pages were most recently edited).
 * <tt>order</tt> &mdash; whether to show the list forward (<tt>ascending</tt>) or backward (<tt>descending</tt>); default is <tt>ascending</tt>.
 * <tt>showdate</tt> &mdash; if non-blank, shows the date when each page was added to the first category (even if <tt>method=lastedit</tt>).
 * <tt>mode</tt> &mdash; what kind of list to generate; default is an unordered list, i.e., each page is preceded by a bullet; alternatives are <tt>ordered</tt>, i.e., the pages are numbered (1, 2, 3, ...), and <tt>none</tt>.

Internals
Parameter defaults are coded in DPL/simple. Requests for extended maximum list length are dispatched to DPL/0.