Difference between revisions of "Template:SortCell"

From Kerbal Space Program Wiki
Jump to: navigation, search
(lets try it...)
 
(*improved documentation;)
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<includeonly>data-sort-value="{{{1}}}"</includeonly><noinclude>Automatically adds the data sort value for sortable tables.
+
<includeonly>data-sort-value="{{{1}}}" | </includeonly><noinclude>Automatically adds the data sort value for sortable tables. Additional cell properties must be listed before that template and the content of the cell starts directly after that template. If used properly is doesn't display anything directly (just in the source code).
 +
 
 +
{{Parameter table|parameters=
 +
{{Parameter row|1|Sort value}}
 +
}}
 +
 
 +
== Example ==
 +
 
 +
<pre>{| class="wikitable sortable"
 +
! Name
 +
! Diameter
 +
|-
 +
| Kerbin
 +
| {{SortCell|600000}} 600 km
 +
|-
 +
| Kerbol
 +
| {{SortCell|261600000}} 261.6 Mm
 +
|-
 +
| Gilly
 +
| {{SortCell|13000}} 13 000 m
 +
|}</pre>
 +
 
 +
{| class="wikitable sortable"
 +
! Name
 +
! Diameter
 +
|-
 +
| Kerbin
 +
| {{SortCell|600000}} 600 km
 +
|-
 +
| Kerbol
 +
| {{SortCell|261600000}} 261.6 Mm
 +
|-
 +
| Gilly
 +
| {{SortCell|13000}} 13 000 m
 +
|}
 +
 
 +
[[Category: Formatting and function templates‎]]</noinclude>

Revision as of 15:14, 28 September 2014

Automatically adds the data sort value for sortable tables. Additional cell properties must be listed before that template and the content of the cell starts directly after that template. If used properly is doesn't display anything directly (just in the source code).

# Optional Description Default
1 No Sort value

Example

{| class="wikitable sortable"
! Name
! Diameter
|-
| Kerbin
| {{SortCell|600000}} 600 km
|-
| Kerbol
| {{SortCell|261600000}} 261.6 Mm
|-
| Gilly
| {{SortCell|13000}} 13 000 m
|}
Name Diameter
Kerbin 600 km
Kerbol 261.6 Mm
Gilly 13 000 m