Extension:DynamicPageList (Wikimedia)


 * Derived extensions: DynamicPageList2 is a modified version with more features, but also more resource-expensive. DPLforum outputs in forum style.

DynamicPageList is a Mediawiki 1.5 extension developed for Wikinews. It is currently installed on all language Wikinews projects (see n:Wikinews:DynamicPageList) and Meta, and can be installed on any wiki. It allows wiki users to create a list of pages that are listed in a set of categories. See m:Help:DPL for general information.

Installation
The dynamic page list is in Wikimedia SVN. To install it, place DynamicPageList.php and DynamicPageList.i18n.php in your  directory and add   to your LocalSettings.php file.

Use
DynamicPage list can be used with XML-like syntax in the wiki edit view. The parameters control the pages to list, order, and display mode. See the following sections for information on each parameter. For example, the following are the oldest five pages on this wiki that should be moved to MediaWiki.org.

  category            = Pages to be exported to MediaWiki.org count               = 5 order               = ascending addfirstcategorydate = true 

 category            = Pages to be exported to MediaWiki.org count               = 5 order               = ascending addfirstcategorydate = true 

category
category lists categories to intersect. DynamicPageList will list pages that are found in every category listed. A minimum and maximum number of entries to list is set in the extension's source code. You may use magic words like August in the category name.

The syntax is

  category = Demo category = Demo 1 

category = Demo category = Demo 1

notcategory
notcategory restricts the list of pages to those not in a particular category. You can use magic words like August in the category name.

  category   = Demo notcategory = Demo 1 

 category   = Demo notcategory = Demo 1 

namespace
namespace restricts the list of pages specified above to those in a particular namespace, specified by name or number (see the List of default namespaces). Any invalid name is equivalent to the main article namespace.

  category = Demo namespace = Help 

 category = Demo namespace = Help </DynamicPageList>

redirects
redirects determines whether or not to include redirect pages. The value can be exclude (default, don't list redirects), include (list redirects), or ''only (don't list pages that aren't redirects).

<div style="">  category = Demo redirects = only </DynamicPageList>

 category = Demo redirects = only </DynamicPageList>

count
count restricts the number of results that are shown. By default, the pages added to the category most recently are shown (see order). Note that the extension will not list more results than the maximum defined in the extension source code.

<div style="">  category = Demo count   = 2 </DynamicPageList>

 category = Demo count   = 2 </DynamicPageList>

shownamespace
shownamespace displays the namespace in the page names. The value can be true (default, display in name: Help:Contents) or false (don't display in name: Contents).

<div style="">  category     = Demo shownamespace = false </DynamicPageList>

 category     = Demo shownamespace = false </DynamicPageList>

addfirstcategorydate
addfirstcategorydate shows the date each article was added to category. The value can be true (display date) or false (default, don't display date). If many categories are specified, it uses the first category. The linked page names are prepended with the date formatted according to your local MediaWiki date display preferences.

<div style="">  category            = Demo addfirstcategorydate = true </DynamicPageList>

 category            = Demo addfirstcategorydate = true </DynamicPageList>

mode
mode determines the format of the list. The value can be unordered (bulleted list), ordered (numbered list), or none (plain text with line breaks).

<div style=""> unordered:  category = Demo mode    = unordered </DynamicPageList>

ordered:  category = Demo mode    = ordered </DynamicPageList>

plain text:  category = Demo mode    = none </DynamicPageList>

unordered:  category = Demo mode    = unordered </DynamicPageList>

ordered:  category = Demo mode    = ordered </DynamicPageList>

plain text:  category = Demo mode    = none </DynamicPageList>

suppresserrors
suppresserrors hides errors. The value can be true (hide errors) or false (default, show errors).

<div style="">

true:  category      = Dem suppresserrors = true </DynamicPageList>

false: <DynamicPageList> category      = Dem suppresserrors = false </DynamicPageList>

true: <DynamicPageList> category      = Dem suppresserrors = true </DynamicPageList>

false: <DynamicPageList> category      = Dem </DynamicPageList>

ordermethod
ordermethod determines the order and date to display. The value can be categoryadd (default, sort by date pages were categorised) or lastedit (sort by date pages were last edited).

<div style=""> <DynamicPageList> category            = Demo addfirstcategorydate = true ordermethod         = lastedit </DynamicPageList>

<DynamicPageList> category            = Demo addfirstcategorydate = true ordermethod         = lastedit </DynamicPageList>

order
order decides the sort direction. The value can be descending (default, most recent to oldest) or ascending (oldest to most recent).

<div style=""> <DynamicPageList> category = Demo order    = ascending </DynamicPageList>

<DynamicPageList> category = Demo order    = ascending </DynamicPageList>