Help:Dynamic Page List Function
From WaterWiki.net
Contents |
What is the Dynamic Page List Function?
Dynamic Page List (DPL) is a universal reporting tool for listing articles on a wiki that fit certain categories and other criteria. Such lists can be presented in various formats. 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. Thus, DPL essentially creates 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.
Assume you have written some articles about Water Basins. 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 'Water Profile' or 'Issues in Basin'
- They will use a template which is used to present highly structured short data items ('Water volume', 'Surface area', ..) in a nice way (e.g. as a wikitable)
Let us assume that there is an article on Irrigation. You want to give some information about this method of water application for helping crop growth over various water basins. But you do not want to create redundancy by repeating information that was already given in the articles on each water basin.
In our scenario the natural approach with DPL would be to generate a list of 'water basins' (=category) where irrigation is practised (i.e. restrict your selection to articles of category 'water basin' which contain a link to 'irrigation'). Typically you would want to include part of the text chapter on 'Irrigation' from each of the relevant water basins, along with some additional relevant information. The output should be shown as an alphabetically ordered list.
DPL functionalities
DPL can
- generate a list of all such 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
Using DPL
- Step 1
Decide on the articles you want to list: Select by a logical combination (AND,OR,NOT) of categories and specify a range for the number of categories the article must be assigned to. E.g. <DPL> category=Kyrgyzstan category=project|publication|organisation notcategory=CoP-Member notcategory=CoP-Contact </DPL>
DPL will select articles that have the category 'Kyrgyzstan', AND 'project OR 'publication' OR 'organisation, but NOT 'Cop-Member' and 'COP-Contact'.
<DPL>
category=Kyrgyzstan
category=project
category=publication
category=organisation
notcategory=CoP-Member
notcategory=CoP-Contact
</DPL>
DPL will select articles that have the category 'Kyrgyzstan', AND 'project AND 'publication' AND 'organisation, but NOT 'Cop-Member' and 'COP-Contact'. Articles in 1,2,3 of the necessary categories will not be listed, only those matching all 4 categories. A warning message indicates that no articles matched ALL 4 categories.
- Step 2
Order the result list of articles: Articles can be ordered according to
- name (default)
- date of last change
ordermethod=lastedit
- popularity
ordermethod=count
- user who changed them last
ordermethod=lastauthor
- use descending or ascending sequence
order=ascending (default - least to most) order=descending
<DPL>
category=Kyrgyzstan
category=project|publication|organisation
notcategory=CoP-Member
notcategory=CoP-Contact
mode=ordered
ordermethod=title
order=descending
</DPL>
DPL will order the list according to the name/title of articles. Articles will be listed in descending order (alphabetically a-z).
- Step 3
Define attributes you want to see:
- article name (default)
- article namespace
- date of last change
addeditdate=true (if ommitted default is for this not to appear)
- user who changed them last
addlasteditor=true (if ommited default is for this not to appear)
- categories the articles listed belong to
addcategories=true (if ommitted default is for this not to appear)
<DPL>
category=Kyrgyzstan
category=project|publication|organisation
notcategory=CoP-Member
notcategory=CoP-Contact
mode=ordered
ordermethod=title
order=descending
addeditdate=true
</DPL>
DPL will list articles according to the criteria above, and in addition will list the date each article was last edited. But the last editor and categories to which each article belongs will not be shown.
N.B. DPL IS CASE-SENSITIVE so be careful!!
See Also
For further examples, see DPL Examples or Sandbox17. Additional examples can also be found on the separate DPL website.
DPL can do even more than is explained here, to read more see the DPL Manual.

