Controlling output order: Difference between revisions

m
Fix the ordermethod text running together and being silly to read. This is far easier to read. I spent so long on some of the difficult to figure out examples that it's now past my bed time
imported>FrozenPlum
m (Add a category sortkey, so these can be displayed in the correct order on the parameter quick reference page. I still need to go through this page (when I'm finished the others that are more complex) and do all the examples, plus more content fixes.)
imported>FrozenPlum
m (Fix the ordermethod text running together and being silly to read. This is far easier to read. I spent so long on some of the difficult to figure out examples that it's now past my bed time)
Line 35:
 
 
'''''methodN''''' can be one of the following '''single''' tokensvalues:
 
{| class="wikitable"
! Method
! Description
|-
|'''''categoryadd'''''
;''categoryadd'': outputs|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).
;''counter'': outputs list based on the number of times the page has been viewed (by ~popularity) : {{note|'''AttentionNote:''' Requires the [https[mw://www.mediawiki.org/wiki/Extension:HitCounters|HitCounters]] HitCounter Extension]extension for wikis on MediaWiki 1.25.0 or higher since the counter feature was removed<ref>[https://www.mediawiki.org/wiki/Manual:$wgDisableCounters Manual:$wgDisableCounters]</ref>; this extension is not yet available on Miraheze wikis.}}
|-
|'''''size'''''
;''size'': outputs|Outputs list based on the size of the article (bytes of wiki text).
|-
|'''''firstedit'''''
;''firstedit'': outputs|Outputs list based on first edit to the pages (creation).
|-
|'''''lastedit'''''
;''lastedit'': outputs|Outputs list based on most recent edit to the pages.
|-
|'''''pagetouched'''''
;''pagetouched'': outputs|Outputs list based on 'page_touched' timestamp. Read comment on page_touched field in [[mw:Page_table|Page_table]] to see the difference from most recent edit by an author.
|-
|'''''pagesel'''''
;''pagesel'': outputs|Outputs list based on the names of the reference pages which are used in the selection of a <code>linksfrom</code> or <code>linksto</code> statement. ''pagesel'' only makes sense if there is more than one page mentioned in the <code>linksfrom</code> or <code>linksto</code> condition.
|-
|'''''title'''''
;''title'': outputs|Outputs list sorted by article (prefix +) title.
|-
|'''''titlewithoutnamespace'''''
;''titlewithoutnamespace'': outputs|Outputs list sorted by the article name regardless of namespace.
|-
;|'''''category,sortkey'''''
;''sortkey'': outputs|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.
|-
|'''''none'''''
;''none'': do|Do not apply any ordering (except ordering by timestamp if you requested a list of revisions); this method '''must be used when you specify '''openreferences=yes'''. — '''(default)'''.
|}
 
;''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) : '''Attention:''' Requires the [https://www.mediawiki.org/wiki/Extension:HitCounters HitCounter Extension] for wikis on MediaWiki 1.25.0 or higher since the counter feature was removed<ref>[https://www.mediawiki.org/wiki/Manual:$wgDisableCounters Manual:$wgDisableCounters]</ref>.
;''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 [[mw:Page_table|Page_table]] to see the difference from most recent edit by an author.
;''pagesel'': outputs list based on the names of the reference pages which are used in the selection of a <code>linksfrom</code> or <code>linksto</code> statement. ''pagesel'' only makes sense if there is more than one page mentioned in the <code>linksfrom</code> or <code>linksto</code> condition.
;''title'': outputs list sorted by article (prefix +) title
;''titlewithoutnamespace'': outputs list sorted by the article name regardless of namespace
 
'''''methodN''''' can also be one of the following token'''combination''' of combinationsvalues (see also [[Controlling output format#headingmode|''headingmode'']] option):
 
{| class="wikitable"
;''category,firstedit'': outputs list sorted by category, then by first edit
! Method
;''category,lastedit'': outputs list sorted by category, then by last edit within a category
! Description
;''category,pagetouched'': outputs list sorted by category, then by pagetouched
|-
;''category,sortkey''
|'''''category,firstedit'''''
;''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
;''user,firstedit'': outputs|Outputs list sorted by usercategory, then by firstedit by thefirst useredit.
|-
;''user,lastedit'': outputs list sorted by user, then by lastedit by the user
|'''''category,lastedit'''''
 
;''category,lastedit'': outputs|Outputs list sorted by category, then by last edit within a category.
;''none'': do not apply any ordering (except ordering by timestamp if you requested a list of revisions); this method '''must be used when you specify '''openreferences=yes'''. — '''(default)'''
|-
|'''''category,pagetouched'''''
;''category,firstedit'': outputs|Outputs list sorted by category, then by first editpagetouched.
|-
|'''''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.
|-
|'''''user,firstedit'''''
|Outputs list sorted by user, then by firstedit by the user.
|-
|'''''user,lastedit'''''
;''user,lastedit'': outputs|Outputs list sorted by user, then by lastedit by the user.
|}
 
 
Anonymous user