17

Having a standard wiki table

{| class="sortable wikitable"
! Title
! Authors
! ID Number
|-
| '''Applying UML and Patterns'''
| Craig Larman
| ID432
...

how to make the table sort the table by the 3rd column (ID) ascending?

Parobay
  • 2,549
  • 3
  • 24
  • 36

2 Answers2

12

According to MediaWiki documentation:

When users are first presented with a table, the rows will always appear in the same order as in the wikitext. If you want a table to appear sorted by a certain column, you must sort the wikitext itself in that order. This is usually done for the first column.

Hope it helps!

Isaac Contreras
  • 329
  • 3
  • 5
  • You can always make that column sortable, but it won't be sorted on page load unless you do it manually from the wikitext... I guess an extension could be done for that, but I don't know how difficult it would be to override the default wikitable behaviour. – Isaac Contreras Apr 24 '13 at 17:11
  • @Parobay If the table is not already sorted in the wiki text, it is probably best to sort it in the wiki text, because it will be much easier to maintain. – HelloGoodbye Feb 18 '16 at 12:50
  • 1
    This is a super inconvenient feature gap – forresthopkinsa Jan 14 '21 at 18:24
-2

As per wiki-help provide

When users are first presented with a table, the rows will always appear in the same order as in the wikitext. If you want a table to appear sorted by a certain column, you must sort the wikitext itself in that order. This is usually done for the first column. The VisualEditor makes it easy to move individual table columns and rows around. For info about that, and also about putting a table in initial alphabetical order see the relevant section here.

More over You can make the table sortable and selected columns 'unSortable' Click here to know more about it.