Template:0

From MHWiki
Revision as of 02:20, 22 May 2016 by YiKai (talk | contribs) (template to fix numerical sorting)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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