Wikinews:Technical solutions/DynamicPageList
From Wikinews, the free news source you can write!
This page is no longer current and/or valid. It is kept for historical record or interest. Do not assume content on this page is still technically correct.
- This page has been superseded by: → Wikinews:DynamicPageList
DynamicPageList (DPL) is a Mediawiki extension which allows for the creation of lists of links to articles based on categories, with the most recently edited articles are on top. A list may be created where article must be a part of multiple categories in order to be found, for example a list of all articles about Africa and Sports would find the following:
- Final draw sets groups for FIFA World Cup 2010
- Ivory Coast fined US$47,000 by FIFA over March stampede
- USA upsets Spain, wins 2–0 in FIFA Confederations Cup semifinal
- Egypt wins 2008 Africa Cup of Nations
- Australia names squad for remaining 2010 football World Cup qualifiers
[edit] How to use it
With the extension properly installed (as it is on the Wikinews projects), there are two parameters, categories and count.
- Category
category=Category to search for
- Very simply, you list the names of the categories you plan to search for. There are both minimum and maximum number of categories you may currently search for. The current maximum is set at 3 by default, and the minimum is 1. To search for more than one category, list each on a new line.
- Count
count=10
- This is the maximum number of articles to returen from a search. There is a default maximum of 50; most cases a number from 3-10 is probably appropriate.
- Example
<DynamicPageList> category=Africa category=Sports count=5 </DynamicPageList>
[edit] History
The extension grew out of a need to automate the Wikinews main page (which has not yet been implemented.) That need led to a feature request, and IlyaHaykinson (goaded by Amgine) was able to build an initial script to meet the need.
The script is still being developed, but improvements have not yet been implemented.
