Template:Sorting row
Usage
{| class="sortable wikitable"
! A || B || C
|-{sorting row|3}
| 1 || 2 || 3
|-
| 4 || 5 || 6
|-
| 7 || 8 || 9
|}
|
→ |
|
See list of articles transcluding {Sorting row}
. See transclusion count for Sorting row and Sort row.
Known issues
{Sorting row} cannot be used with data-sort-type=VALUE
, class=unsortable
or any other attributes. These attributes have to be set on the header cell that has the sorting arrows, which cannot be done through this template. See: Help:Sortable tables for more info.
If you need to use these attributes, you will have to add the sorting row manually under the bottom-most row of column headers. The following adds a row of three empty column headers, where the second has a sort type and the third is unsortable. Be sure to keep the <br>
element in the first column's text portion of the markup, which is needed for the height of the sorting row.
|-
! <br>
! data-sort-type=number |
! class=unsortable |
By default the sorting arrows will be right aligned in the header cells. To center the sorting arrows, use the following "style" attribute in each column header with the exception of any with the "unsortable" class that disables sorting for specific columns.
|-
! style=background-position:center | <br>
! style=background-position:center data-sort-type=number |
! class=unsortable |