DPL
From Sunshine Review
Contents |
[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:
- Augusta feud over records takes a smelly turn
- Bay City officials delay response to Times request for policies
- Chippewa Valley school spending under review
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
- See main 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>
