Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mediawiki wikitable default sorting in descending order

Tags:

mediawiki

I have something like

{| class="wikitable sortable"
|-
! Year || Country
|-
| 2000 || US
|-
| 2001 || Japan
|-
| 1999 || Germanay
|}

But I want this will appear in wiki page automatically in descending order of year, even if I put 2000 before 2001.

Can I choose such "default" for wikitable ordering?

like image 429
user3123767 Avatar asked Dec 06 '25 23:12

user3123767


1 Answers

No.

But if you haven't disabled MediaWiki/Common.js, you could rearrange the table on pageload with JavaScript. See also https://meta.wikimedia.org/wiki/Help:Sorting#Default_order (“It is not possible to make a table appear sorted by a certain column without the user clicking on it.”)

like image 166
leo Avatar answered Dec 11 '25 21:12

leo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!