Help:Sortable tables: Difference between revisions

Content deleted Content added
Sorting the wikitext of a table: made new section on "sorting tables by default", and attempt to clarify the existing section
Line 834:
 
The style can be adjusted to make it appear as a single table. If for some row the height of that row is too small for the text in a cell on one of the sides, the browser increases it, and there is no longer a match.
 
==Sorting tables by default==
It is not possible to make a table appear sorted by a certain column by default. The rows of a table always appear in the same order as in the wikitext, by default. If you wish a table to appear sorted by a certain column, you must sort the wikitext in that order; see the next section.
 
==Sorting the wikitext of a table==
SortingOne doesway not directlyto sort the ''wikitext'' itself, accordingby toa onecertain of the sortkeys. If itcolumn is desired to createuse athe newfollowing default sort order,trick. youYou can make an auxiliary sortable table renderedcontaining asthe wikitext for the original table, and sort it. You can then sortreplace the original wikitext ofby thethis originalsorted tablewikitext.
 
Example:
Line 867 ⟶ 870:
<nowiki>|}</nowiki>
 
AfterNow copyingyou can sort the above table, and copy the rendered text to the edit box,. andAfter deleting the "header" line, this renders as a new defaultly sorted table:
 
{|class="wikitable sortable"