close
Sayahna Sayahna
Search

Difference between revisions of "Template:Rank"


(add sort key class)
 
m (1 revision)
 
(No difference)

Latest revision as of 04:18, 22 March 2014

Documentation icon Template documentation[view] [edit] [history] [purge]

Use

This template creates a sortable table cell displaying a ranking index, either numeric or nonnumeric. Numbers are sorted first in numeric order followed by nonnumeric indexes in alphanumeric order.

The syntax of this template is:

{{rank|var1|rowspan=}}

where:

  • var1 is the ranking
  • rowspan is an optional rowspan (default=1)

Example

The use of this template is illustrated in the sortable table below:

Wikitext Rank without template
{{rank|1}} !000001 1
{{rank|2}} !000002 2
{{rank|3}} !000003 3
{{rank|6}} !000006 6
{{rank|56}} !000056 56
{{rank|456}} !000456 456
{{rank|3456}} !003456 3456
{{rank|23456}} !023456 23456
{{rank|123456}} !123456 123456
{{rank|Aardvark}} Aardvark Aardvark
{{rank|Bison}} Bison Bison
{{rank|Camel}} Camel Camel
{{rank|0}} !000000 0
{{rank|0.1}} !0000000.1 0.1
{{rank|1.2}} !000001.2 1.2
{{rank|12.34}} !000012.34 12.34
{{rank|123.456}} !000123.456 123.456
{{rank|1234.5678}} !001234.5678 1234.5678
{{rank|12345.67890}} !012345.67890 12345.67890
{{rank|123456.789012}} !123456.789012 123456.789012
{{rank|NA}} NA NA

Technical details