Difference between revisions of "Template:0"

From MHWiki
(template to fix numerical sorting)
 
m (noinclude)
Line 1: Line 1:
<includeonly><span style="display:none">0{{{1|}}}</span></includeonly>
+
<includeonly><span style="display:none">0{{{1|}}}</span></includeonly><noinclude>
 
 
 
A template for left padding of hidden leading zeros to force numerical sorting in tables.
 
A template for left padding of hidden leading zeros to force numerical sorting in tables.
  
Line 22: Line 21:
 
**Add <nowiki>{{0|,0}}</nowiki> in front of xx
 
**Add <nowiki>{{0|,0}}</nowiki> in front of xx
 
**Add <nowiki>{{0|,00}}</nowiki> in front of x
 
**Add <nowiki>{{0|,00}}</nowiki> in front of x
 +
</noinclude>

Revision as of 02:36, 22 May 2016

A template for left padding of hidden leading zeros to force numerical sorting in tables.

Usage

  • Using {{0}} will generate <span style="display:none">0</span>
  • Using {{0|foo}} will generate <span style="display:none">0foo</span>

Examples

  • If the the largest number is xxx,xxx [, ...]
    • Add {{0}} in front of xx,xxx
    • Add {{0|0}} in front of x,xxx
    • Add {{0|00,}} in front of xxx
  • If the the largest number is xx,xxx [, ...]
    • Add {{0}} in front of x,xxx
    • Add {{0|0,}} in front of xxx
    • Add {{0|0,0}} in front of xx
  • If the the largest number is x,xxx [, ...]
    • Add {{0|,}} in front of xxx
    • Add {{0|,0}} in front of xx
    • Add {{0|,00}} in front of x