Controlling output order: Difference between revisions

m
Hopefully this makes things somewhat clearer, order requires ordermethod to work, that was a big piece of missed information for most. XD
imported>FrozenPlum
mNo edit summary
imported>FrozenPlum
m (Hopefully this makes things somewhat clearer, order requires ordermethod to work, that was a big piece of missed information for most. XD)
Line 26:
{{DPL Parameter
|name = ordermethod
|purpose= Sets the criteria used to order the list, usually combined with <code>{{DPL|order}}{{=}}</code> and ''ascending'' or ''descending''; or alternatively combined with <code>{{DPL|headingmode}}</code>.
|purpose= Determines what criterion or criteria are used to order the list.
}}
 
Line 43:
|'''''categoryadd'''''
|Outputs list based on most recent addition to the first category (requires to include one category and one only using 'category' parameter).
{{note|See '''''sortkey''''' for sorting by page order in a category.}}
|-
|'''''counter'''''
Line 70 ⟶ 71:
|-
|'''''sortkey'''''
|Outputs list sorted by title and [[mw:Help:Categories#Sort key|(category) sortkey]],; requires at least one category statement, and a sortkey mustcan be setmanually specified on ateach leastpage oneif ofdesired rather than the outputcategory pagesdefault sort order (see [[mw:Help:Categories#Sort key|(category) sortkey]]).
|-
|'''''none'''''
Line 93 ⟶ 94:
|-
|'''''category,sortkey'''''
|Outputs list sorted by title and [[mw:Help:Categories#Sort key|(category) sortkey]], requires at least one category statement and a sortkey must be set on at least one of the output pages.
|-
|'''''user,firstedit'''''
Line 119 ⟶ 120:
{{DPL Parameter
|name = order
|purpose= Controls the sort direction of the list, '''requires''' <code>{{DPL|ordermethod}}</code> to be set, so that DPL knows which criterion (or criteria) to sort by.
}}
 
Line 126 ⟶ 127:
 
''orderdirection'' can be one of:
* ''ascending'' — depending on the critria set, smallest to largest, least to most, 0 to 9 and/or A to Z — '''(default)'''
* ''descending''
* ''descending'' — depending on the critria set, largest to smallest, most to least, 9 to 0 and/or Z to A
* ''ascending'' — '''(default)'''
 
 
If combined with <code>{{DPL|ordermethod}}</code>, the <code>''ascending''</code> and <code>''descending''</code> values can control the sort direction of some ordermethod values, such as <code>ordermethod=''title''</code>.
 
* ''descending'' &mdash; outputs list from most recent to least recent
* ''ascending'' &mdash; outputs list from least recent to most recent — '''(default)'''
 
 
Anonymous user