Difference between revisions of "DPL:Manual - DPL parameters: Controlling output order"
From FollowTheScore
(New page: {{Type:Manual|section=Controlling output order}} __TOC__ ===ordermethod=== {{DPL parameter |name = ordermethod |purpose= Determines what criterium (resp. criteria) is (resp. are) use...) |
(→ordermethod: category,sortkey; -underline so as to not confuse them with links) |
||
Line 13: | Line 13: | ||
<code>ordermethod=<i>method1,method2,...</i></code> means ordered by method1 first, then by method2, etc. (like the ORDER clause in SQL) | <code>ordermethod=<i>method1,method2,...</i></code> 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) | ;''categoryadd'': outputs list based on most recent addition to the first category (requires to include one category and one only using 'category' parameter) | ||
Line 24: | Line 24: | ||
;''titlewithoutnamespace'': outputs list sorted by the article name regardless of namespace | ;''titlewithoutnamespace'': outputs list sorted by the article name regardless of namespace | ||
− | + | ''methodN'' can also be one of the following token combinations (see also [[#headingmode|''headingmode'']] option): | |
;''category,firstedit'': outputs list sorted by category, then by first edit | ;''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,lastedit'': outputs list sorted by category, then by last edit within a category | ||
;''category,pagetouched'': outputs list sorted by category, then by pagetouched | ;''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,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 | ;''user,lastedit'': outputs list sorted by user, then by lastedit by the user |
Revision as of 14:42, 29 August 2007
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.