Usage
This template is for use within tables, and will automatically calculate a Win %
There is the option to align the numbers by adding align=
and then left/centre/right as required, and choose the number of decimal places by defining decimals=
For example putting
{{WDL|30|10|12|8}}
within a table will display this. It will display trailing zeroes (e.g. the second case)
Record
|
P |
W |
D |
L |
Win %
|
700130000000000000030
|
700110000000000000010
|
700112000000000000012
|
70008000000000000008
|
700133330000000000033.33
|
7002100000000000000100
|
700110000000000000010
|
70001000000000000001
|
700189000000000000089
|
700110000000000000010.00
|
There is also the option of adding in two goals columns before the percentage by using for=
and against=
. For example {{WDL|100|10|1|89|for=112|against=88}}
or {{WDL|100|10|1|89|for=112|against=88|diff=yes}}
:
Record
|
P |
W |
D |
L |
GF |
GA |
Win %
|
7002100000000000000100
|
700110000000000000010
|
70001000000000000001
|
700189000000000000089
|
7002112000000000000112
|
700188000000000000088
|
700110000000000000010.00
|
Record
|
P |
W |
D |
L |
GF |
GA |
+/- |
Win %
|
7002100000000000000100
|
700110000000000000010
|
70001000000000000001
|
700189000000000000089
|
7002112000000000000112
|
700188000000000000088
|
+24
|
700110000000000000010.00
|
For a total column at the bottom use {{WDLtot}} in the same way.
Record
|
P |
W |
D |
L |
Win %
|
700130000000000000030
|
700110000000000000010
|
700112000000000000012
|
70008000000000000008
|
700133330000000000033.33
|
7002100000000000000100
|
700110000000000000010
|
70001000000000000001
|
700189000000000000089
|
700110000000000000010.00
|
7002130000000000000130
|
700120000000000000020
|
700113000000000000013
|
700197000000000000097
|
700115380000000000015.38
|
If the numbers of wins, losses and draws do not add up correctly, the page will appear in Category:WDL error.
Empty parameters
If the first parameter is empty, the value for games played is computed from the sum of Wins Draws and Losses
Record
|
P |
W |
D |
L |
Win %
|
700130000000000000030
|
700110000000000000010
|
700112000000000000012
|
70008000000000000008
|
700133330000000000033.33
|
7002100000000000000100
|
700110000000000000010
|
70001000000000000001
|
700189000000000000089
|
700110000000000000010.00
|
7002130000000000000130
|
700120000000000000020
|
700113000000000000013
|
700197000000000000097
|
700115380000000000015.38
|
If any win, draw, or loss parameter is empty, the value is assumed to be zero when computing the percentage
Record
|
P |
W |
D |
L |
Win %
|
700118000000000000018
|
700110000000000000010
|
|
70008000000000000008
|
700155560000000000055.56
|
700199000000000000099
|
700110000000000000010
|
|
700189000000000000089
|
700110100000000000010.10
|
7002117000000000000117
|
700120000000000000020
|
|
700197000000000000097
|
700117090000000000017.09
|
Record
|
P |
W |
D |
L |
Win %
|
700118000000000000018
|
700110000000000000010
|
|
70008000000000000008
|
700155560000000000055.56
|
700199000000000000099
|
700110000000000000010
|
|
700189000000000000089
|
700110100000000000010.10
|
7002117000000000000117
|
700120000000000000020
|
|
700197000000000000097
|
700117090000000000017.09
|
Record
|
P |
W |
D |
L |
Win %
|
700120000000000000020
|
|
700112000000000000012
|
70008000000000000008
|
050000000000000000000.00
|
700190000000000000090
|
|
70001000000000000001
|
700189000000000000089
|
050000000000000000000.00
|
7002110000000000000110
|
|
700113000000000000013
|
700197000000000000097
|
050000000000000000000.00
|
See also