Template:Sortable ratio: Difference between revisions
Jump to navigation
Jump to search
m (→Usage) |
mNo edit summary |
||
Line 8: | Line 8: | ||
######### | ######### | ||
## ratio template | ## ratio template | ||
#########-->{{#ifeq:{{{text|UNDEFINED}}}|UNDEFINED|{{ratio|{{{1}}}|{{{2}}}|total={{{total|}}}}}|{{ratio|{{{1}}}|{{{2}}}|total={{{total|}}}|text={{{text}}}}}}}</includeonly><noinclude> | #########-->{{#ifeq:{{{text|UNDEFINED}}}|UNDEFINED|{{ratio|{{{1}}}|{{{2}}}|total={{{total|}}}}}|{{ratio|{{{1}}}|{{{2}}}|total={{{total|}}}|text={{{text}}}}}}}</includeonly><noinclude>[[Category:Templates]] | ||
==Usage== | ==Usage== |
Latest revision as of 05:03, 30 January 2014
Usage[edit source]
Usage and output is identical to {{ratio}}, except this template prepends a hidden decimal number that makes ratios sort correctly in sortable tables.
Usage[edit source]
{{sortable ratio|1|2}} |
→ | 0.333, 33.3% (1/3) |
{{sortable ratio|1|2|text=!!!!!}} |
→ | 0.333, 33.3!!!!! |
{{sortable ratio|1|total=3}} |
→ | 0.333, 33.3% (1/3) |
{{sortable ratio|1|2|round=4}} |
→ | 0.333, 33.3% (1/3) |