DPL

From Sunshine Review

Jump to: navigation, search

Contents

Dynamic Page Listings (DPL) are is a universal reporting tool for MediaWikis, listing category members and intersections with various formats and details. In other words-it will automatically create formatted lists of articles pertaining to certain categories.

[edit] How it works

The basics of DPL listings are that if you have a certain category, for example "Michigan News" you can create an automatic list of all the articles that include the said category. For example if I type:

<DPL>
category = Michigan News
</DPL>

Then I'd get:

However you can add many different parameters to these listing controlling their output (aka how they look) and the input (aka what stuff from the article they'll draw from).

[edit] Parameters

For a complete list of parameters check the DPL wiki. However below are some common ones:

Parameter code Function
notcategory For when you want to filter stories. If there is a "notcategory" for a category like "Disputed" than if can filter those news stories from a list.
ordermethod Determines what criterium (resp. criteria) is (resp. are) used to order the list. Example: "firstedit"
order Controls the sort direction of the list. Example: decending
count Controls the amount of articles listed

[edit] Examples

Newspaper feed

<DPL>
category=2009 ballot news
count=20
ordermethod=firstedit
order=descending
userdateformat= M d, Y
addeditdate=true
include=%1
eliminate=templates
format= ,\n¶* <big>'''[[%PAGE%]]'''</big>
</DPL>

Or to create a chart:

<dpl>
category = Sample councilmen
include = {Councilman info}:District:Term:Party
order = ascending
table = class="wikitable", Name, District, Term, Party
tablerow = %%,%%
</dpl>