This style for Lua-based is meant to build group and league tables for competitions with various formats. Unlike other styles for the Sports table module, this style does not calculate values other than the number of games played and a simple calculation for points. If you need other calculations or if you are creating a table for a competition in a sport with a sport specific style, consider using another style. The purpose of the Custom style is to allow a custom configuration of any columns that you intend to use. This documentation explains how to use this module with the Custom style in an article or template, check the table of contents for specific items.
In its simplest form only several parameters need to be used to build a table.
What you type | ||
What it looks like |
The main command is the <nowiki>{{#invoke:Sports table|main|style=Custom}}</nowiki>
statement which basically calls the module and enables you to set everything up. You also need to set the parameter to determine how many columns will be displayed after the team column. If this is not set, then there will be one column after the team column.For each column you now define the column style and/or column header by using and respectively (with N replaced by the column number). For more information on column styles, see
&nbsp;&nbsp;
, except for columns which use a column style or have defined . It is good practice though to include them anyway and to align the columns using appropriate spaces (as in the example), so the code is easy to read. The last step now is to define the parameters which determine what name is shown in the table, you can use wiki markup and templates in here as well. See One of the columns should always be a ranking column. This column may be chosen by a parameter.
What you type | ||
What it looks like |
It is very useful to set column styles in these tables
What you type | ||
What it looks like |
If the column style is set to one of these values, then the default value of a cell is calculated by adding up plus plus, each of whose default values are 0.The column header is <abbr title="Played">Pld</abbr>
, but may be changed using .
If the column style is set to one of these values, then the default value of a cell is the value of or 0 if no such value is given.The column header is <abbr title="Won">W</abbr>
.
If the column style is set to one of these values, then the default value of a cell is the value of or 0 if no such value is given.The column header is <abbr title="Drawn">D</abbr>
. For backwards compatibility with the WDL style, if is set to yes, then the header is <abbr title="Tied">T</abbr>
, and in either case, the header may be changed using
If the column style is set to one of these values, then the default value of a cell is the value of or 0 if no such value is given.The column header is <abbr title="Lost">L</abbr>
.
For backwards compatibility with the WDL style, there is an option for a rounds won column style.If the column style is set to this value, then the default value of a cell is the value of or 0 if no such value is given.The column header is <abbr title="Rounds won">RW</abbr>
, but may be changed using .
If the column style is set to one of these values, then the default value of a cell is the number of points obtained by adding up the appropriate values for the wins, draws, losses, and rounds won.As a default a win is worth 3 points, a draw 1 point, a loss 0 points, and a round won 1 point. These values can be overwritten to what you need by,, and .The column header is <abbr title="Points">Pts</abbr>
.
If the column style is set to this value, then the default value of a cell is the points as calculated above divided by the number of matches as calculated above. Even if these values have been overridden by, the calculated value is used and not the input value.The column header is <abbr title="Points per game">PPG</abbr>
.A column with the ppg style will be slightly wider than the default column width.
It means "ppg average"; same as ppg but the value gives three decimal places.
If the column style is set to one of these values, with S and T replaced by non-mathematical column styles, then the value of a cell will be the mathematical result of the chosen operation on the values determined by the column styles specified by S and T.Note that if entries for S or T are not defined, then a default value of 0 is set, even if they are present in a column with a different default value.A mathematical style does not alter the column header from the default.The parameter determines whether a plus sign is shown on differences that are positive. By default this value is set to .
Any other column style will not set a default value, and so the default cell value set by will be used.If the column style is set to such a value other than those listed above which is at most 3 characters long, then the column header is a fully uppercase version of the column style. For example, if the column style is set to cs, then the column header is CS
.However, if the column style is set to a value other than those listed above that is longer than 3 characters, no alteration to the header will be made. For example, if the 2nd column style is set to cscs, then the column header is <abbr title="Column 2">2</abbr>
.Additionally, if the column style is set to a value other than those listed above, then input may be taken from a parameter given by the column style underscore TTT. For example, if the column style is set to cs, then input may be taken via in addition to the usual .Currently, custom column styles should only contain alphanumeric characters. The results of anything else are undefined.
If you wish to set the column style of multiple columns at once to imitate a different style of the Sports table module, then this may be done using the parameter.
What you type | ||
What it looks like |
Column styles are (in order): pld, win, draw, loss, pts
Column styles are (in order): pld, win, loss, pts
Column styles are (in order): pld, win, draw, loss, gf, ga, diff_gf_ga, pts
Column styles are (in order): pld, win, loss, gf, ga, diff_gf_ga, pts
Several things can be customized in these tables
Normally, only the ranking column has bolded entries. This may be customized.
What you type | ||
What it looks like |
Normally the data in any column (other than the team name column) is placed in the center of the column. This may be customized.
What you type | ||
What it looks like |
What you type | ||
What it looks like |