DPL:Manual - DPL parameters: Controlling output order
Contents
ordermethod
ordermethod | Determines what criterium (resp. criteria) is (resp. are) used to order the list. |
Syntax:
ordermethod=method1,method2,...
means ordered by method1 first, then by method2, etc. (like the ORDER clause in SQL)
methodN can be one of the following single tokens:
- categoryadd
- outputs list based on most recent addition to the first category (requires to include one category and one only using 'category' parameter)
- counter
- outputs list based on the number of times the page has been viewed (by ~popularity)
- size
- outputs list based on the size of the article (bytes of wiki text)
- firstedit
- outputs list based on first edit to the pages (creation)
- lastedit
- outputs list based on most recent edit to the pages
- pagetouched
- outputs list based on 'page_touched' timestamp. Read comment on
page_touched
field in Page_table to see the difference from most recent edit by an author. - title
- outputs list sorted by article (prefix +) title — (default)
- titlewithoutnamespace
- outputs list sorted by the article name regardless of namespace
methodN can also be one of the following token combinations (see also headingmode option):
- category,firstedit
- outputs list sorted by category, then by first edit
- category,lastedit
- outputs list sorted by category, then by last edit within a category
- category,pagetouched
- outputs list sorted by category, then by pagetouched
- category,sortkey
- user,firstedit
- outputs list sorted by user, then by firstedit by the user
- user,lastedit
- outputs list sorted by user, then by lastedit by the user
Example:
<DPL> category=Africa ordermethod=lastedit </DPL>
This list will output pages that have [[Category:Africa]] showing most recently edited articles at the top.
order
order | Controls the sort direction of the list. |
Example:
order=orderdirection
orderdirection can be one of:
- descending — outputs list from most recent to least recent
- ascending — outputs list from least recent to most recent — (default)
Example:
<DPL> category = Africa ordermethod = lastedit order = ascending addeditdate = true </DPL>
This list will output pages that have [[Category:Africa]] shown ordered from oldest to newest. In addition the edit date will be presented with each article.
ordercollation
ordercollation | Allow individual collations, make case insensitive sorting possible |
Example:
ordercollation=latin1_german_ci
You may want to try latin1_swedish_ci or other collation mapping table names as well.
If you use a name for the first time you should set debug=4. This will help you to see the SQL code and SQL error messages in case the name you used is not available in that MySQL installation.