الاستخدام
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 %
|
7001300000000000000♠30
|
7001100000000000000♠10
|
7001120000000000000♠12
|
7000800000000000000♠8
|
7001333300000000000♠33٫33
|
7002100000000000000♠100
|
7001100000000000000♠10
|
7000100000000000000♠1
|
7001890000000000000♠89
|
7001100000000000000♠10٫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 %
|
7002100000000000000♠100
|
7001100000000000000♠10
|
7000100000000000000♠1
|
7001890000000000000♠89 |
7002112000000000000♠112 |
7001880000000000000♠88
|
7001100000000000000♠10٫00
|
Record
|
P |
W |
D |
L |
GF |
GA |
+/- |
Win %
|
7002100000000000000♠100
|
7001100000000000000♠10
|
7000100000000000000♠1
|
7001890000000000000♠89 |
7002112000000000000♠112 |
7001880000000000000♠88 |
+24
|
7001100000000000000♠10٫00
|
For a total column at the bottom use {{WDLtot}} in the same way.
Record
|
P |
W |
D |
L |
Win %
|
7001300000000000000♠30
|
7001100000000000000♠10
|
7001120000000000000♠12
|
7000800000000000000♠8
|
7001333300000000000♠33٫33
|
7002100000000000000♠100
|
7001100000000000000♠10
|
7000100000000000000♠1
|
7001890000000000000♠89
|
7001100000000000000♠10٫00
|
7002130000000000000♠130
|
7001200000000000000♠20
|
7001130000000000000♠13
|
7001970000000000000♠97
|
7001153800000000000♠15٫38
|