Extension:DynamicPageList

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
DynamicPageList (DPL)

Release status: stable

Implementation Tag, Parser function
Description Create lists of other articles based on their category, namespace, title, references or template usage and include contents or arguments of template calls of those articles into your page.
Author(s) IlyaHaykinson, Unendlich, Dangerville, Algorithmix
Version 1.6.8 (2008-03-08)
MediaWiki 1.7 and later
License No license specified
Download Download snapshot

Subversion [Help]
Browse source code

Parameters see description
Example sample report on countries

Dynamic Page List (DPL) is a universal reporting tool for MediaWikis, listing category members and intersections with various formats and details. For usage documentation, see m:DynamicPageList and the manual. Typically the selection of pages to be shown will be based on one or more categories. But there are many other choices for selection criteria, like e.g. author, namespace, date, name pattern, usage of templates or references to other articles.

Contents

[edit] Overview

Assume you have written some articles about countries. Typically these articles will have three things in common:

  • They will belong to a common category
  • They will have a similar chapter structure, i.e. they will contain sections named 'Religion' or 'History'
  • They will use a template which is used to present highly structured short data items ('Capital', 'Inhabitants', ..) in a nice way (e.g. as a wikitable)

[edit] DPL generates reports on other articles

Let us assume that there is an article on Islam. You want to give some information about the spreading of this religion over various countries. But you do not want to create redundancy by repeating information that was already given in the articles on each country.

In our scenario the natural approach with DPL would be to generate a list of 'countries' (=category) where Islam plays a role (i.e. restrict your selection to articles of category 'Country' which contain a link to 'Islam'). Typically you would want to include part of the text chapter on 'Religion' from each of the relevant countries. You might also want to give the number of inhabitants for each country. The output should be shown as an alphabetically ordered table. It would be nice if the user could easily sort the table by inhabitants or some other criteria.

DPL can

  • generate a list of all those articles (or a random sample)
  • show metadata of the articles
  • show one or more chapters of the articles
  • show parameter values which are passed to the common template
  • order articles appropriately
  • present the result in a sortable table (e.g.)
  • use multi column output

[edit] Which steps are necessary?

Find the articles you want to list:

  • select by a logical combination (AND,OR,NOT) of categories
  • specify a range for the number of categories the article must be assigned to
  • select by a logical combination (AND,OR,NOT) of namespaces
  • define a pattern which must match the article´s name
  • name a page to which the article must or must not refer
  • name a template which the article must or must not use
  • exclude or include redirections
  • use other criteria for selection like author, date of last change etc.
  • define regular expressions to match the contents of pages you want to include

Order the result list of articles according to

  • name
  • date of last change
  • popularity
  • user who changed them last
  • size
  • restrict the output to the first n articles or to a random sample
  • use descending or ascending sequence

Define attributes you want to see

  • article name
  • article namespace
  • article size
  • date of last change
  • date of last access
  • user who changed them last

Define contents you want to show

  • whole article
  • contents of certain chapters (identified by headings)
  • text portions (defined by special marker tags in the article)
  • values of template calls

Define the output format

  • specify a headline
  • use ordered list, unordered list
  • use tables, sorted tables (using javascript)
  • use category style listing
  • multi column output
  • truncate title or contents to maximum length
  • add a link to the article or to one or more of its chapters

[edit] DPL generates reports on categories

Apart from producing a list of pages which fit certain criteria, DPL can also create a list of categories a selected set of pages belongs to. This can be useful to get an idea of the semantic scope of a group of pages (which can be defined by some arbitrary criteria). One of the more useful applications would be question like: "To which categories do the pages belong which contain a reference to the current page?"

[edit] DPL extracts objects and relations for generation of graphs with Extension:Wgraph

With DPL you can generate output which is then fed into other MediaWiki extensions. An especially useful application of this kind is graph generation. DPL can analyse your wiki and prepare output which is then used by Extension:Wgraph to visualize it.

[edit] DPL interacts with other extensions

There is a special mechanism which allows to call your own extension inside the result loop of a DPL query. This opens doors for assembling new 'applications' without having to program on php level. For example you can create menu trees for Extension:Treeview, you can create dependency graphs or timebars with Extension:Wgraph, you can call 'gallery' or whatever you want...

[edit] DPL is a platform for building other applications

The power of DPL makes it possible to create applications on wiki template level which would normally require PHP programming.

  • See for example the Extension:DPL Calendar. The advantage is that these applications can be more easily modified and localized.
  • Another example is a leight-weight "semantic wiki" approach. See the DPL demo page for details.

[edit] See also

[edit] Further Reading

DPL can do much more than we can explain here. A complete manual and many examples can be found on the on the separate DPL website.

[edit] Closely associated extension for passing parameters to articles

The website where DPL is offered for download also contains the Call extension which allows to call an arbitrary MediaWiki article from the command line or from a wiki link and pass parameters to the article.

[edit] Other Application

[edit] Related extensions

[edit] Older versions of this extension

Personal tools