Controlling output order: Difference between revisions
Content added Content deleted
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: | Line 26: | ||
{{DPL Parameter |
{{DPL Parameter |
||
|name = ordermethod |
|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: | Line 43: | ||
|'''''categoryadd''''' |
|'''''categoryadd''''' |
||
|Outputs list based on most recent addition to the first category (requires to include one category and one only using 'category' parameter). |
|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''''' |
|'''''counter''''' |
||
Line 70: | Line 71: | ||
|- |
|- |
||
|'''''sortkey''''' |
|'''''sortkey''''' |
||
|Outputs list sorted by |
|Outputs list sorted by [[mw:Help:Categories#Sort key|(category) sortkey]]; requires at least one category statement, and a sortkey can be manually specified on each page if desired rather than the category default sort order (see [[mw:Help:Categories#Sort key|(category) sortkey]]). |
||
|- |
|- |
||
|'''''none''''' |
|'''''none''''' |
||
Line 93: | Line 94: | ||
|- |
|- |
||
|'''''category,sortkey''''' |
|'''''category,sortkey''''' |
||
|Outputs list sorted by title and [[mw:Help:Categories#Sort key|sortkey]], requires at least one category statement and a sortkey must be set on at least one of the output pages. |
|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''''' |
|'''''user,firstedit''''' |
||
Line 119: | Line 120: | ||
{{DPL Parameter |
{{DPL Parameter |
||
|name = order |
|name = order |
||
|purpose= Controls the sort direction of the list. |
|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: | Line 127: | ||
''orderdirection'' can be one of: |
''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'' — outputs list from most recent to least recent |
|||
* ''ascending'' — outputs list from least recent to most recent — '''(default)''' |
|||