Search results
Results from the WOW.Com Content Network
In the tables below, all columns sort correctly. The wikitext for the first entry in each table in the first row is shown in the table header. Note: None of the table columns use the data-sort-type= modifier. Using data-sort-type= can sometimes break sorting when used with the template.
Help:Sortable tables#Sorting buttons in a separate row; Each row must have the same number of cells as the other rows, so that the number of columns in the table remains consistent. With colspan and rowspan cells can span several columns or rows; (see § Mélange, below)
Collapsible tables can be sortable, too, by also including the sortable class (see § Sortable tables). By default, a collapsible table begins expanded. To change this, add the additional class mw-collapsed.
Edit-tricks are most useful when multiple tables must be changed, then the time needed to develop complex edit-patterns can be applied to each table. For each table, insert an alpha-prefix on each column (making each row-token "|-" to sort as column zero, like prefix "Row124col00"), then sort into a new file, and then de-prefix the column entries.
The two most commonly used classes are "wikitable" and "wikitable sortable"; the latter allows the reader to sort the table by clicking on the header cell of any column. |+ caption Required for accessibility purposes on data tables, and placed only between the table start and the first table row. ! header cell Optional.
See Help:Sortable tables about rank columns and row numbers. See also: Commons:Convert tables and charts to wiki code or image files. See the section on updating List of countries by incarceration rate. Launch the visual editor. In the column you are copying click the header cell or whatever top cell you want.
Whenever you create or edit a table, consider whether you can make it sortable. Sortable tables have arrows in the cells of the top row that you can click to sort by that column, as shown in Figure 14-10 (see the section about alternative list formats).
In the example here, the table will be sorted by column 3 first, then by column 2. numeric numeric=2: Columns which use numeric sorting when auto-sorted. Takes comma-separated list of column numbers. descending descending=3: Columns for which the auto-sort order should be descending (otherwise, ascending is used).