Difference between revisions of "Module:TeamBracket/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>SocietyBox
m (9 revisions imported)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{high-use| 3,000+ | Wikipedia talk:High-risk templates }}
+
{{high-use| 5,000+ | Wikipedia talk:High-risk templates }}
 +
{{Module rating |release}}
  
 
This template implements a generic visual representation of the bracket of a [[single-elimination tournament]] with any number or rounds. For common usage, use the {{tl|64TeamBracket}}, {{tl|32TeamBracket}}, {{tl|16TeamBracket}}, {{tl|8TeamBracket}}, {{tl|4TeamBracket}}, {{tl|2TeamBracket}} templates.
 
This template implements a generic visual representation of the bracket of a [[single-elimination tournament]] with any number or rounds. For common usage, use the {{tl|64TeamBracket}}, {{tl|32TeamBracket}}, {{tl|16TeamBracket}}, {{tl|8TeamBracket}}, {{tl|4TeamBracket}}, {{tl|2TeamBracket}} templates.
Line 27: Line 28:
 
: <code>team-width – </code>the width of the cells for team names.
 
: <code>team-width – </code>the width of the cells for team names.
 
: <code>score-width – </code>the width of the cells for scores.
 
: <code>score-width – </code>the width of the cells for scores.
 +
: <code>seeds – </code>set to <code>no</code> to hide all seeds.
 +
: <code>compact – </code>set to <code>yes</code> for compact bracket and to disable groups.
  
 
: <code>RD<sub>n</sub> – </code>The name of round ''n''.
 
: <code>RD<sub>n</sub> – </code>The name of round ''n''.
Line 48: Line 51:
 
:: The name of group ''m'' in round ''n''. For each round, every set of four teams is classified as a group.
 
:: The name of group ''m'' in round ''n''. For each round, every set of four teams is classified as a group.
 
:; ''RD<sub>n</sub>-seed<sub>m</sub>''
 
:; ''RD<sub>n</sub>-seed<sub>m</sub>''
:: The seed of team ''m'' in round ''n''. For round 1, this value defaults to the conventional seed allocation for tournaments. If omitted, the cell is hidden. To hide seeds for round 1, the value must be explicitly set to be empty. ''m'' may be zero-padded position.
+
:: The seed of team ''m'' in round ''n''. For round 1, this value defaults to the conventional seed allocation for tournaments. If omitted, the cell is hidden. To hide seeds for round 1, the value must be explicitly set to be empty. ''m'' is the zero-padded position.
 
:; ''RD<sub>n</sub>-team<sub>m</sub>''
 
:; ''RD<sub>n</sub>-team<sub>m</sub>''
:: The name of team ''m'' in round ''n''. ''m'' may be zero-padded position.
+
:: The name of team ''m'' in round ''n''. ''m'' is the zero-padded position.
 
:; ''RD<sub>n</sub>-score<sub>m</sub>''
 
:; ''RD<sub>n</sub>-score<sub>m</sub>''
:: The score of team ''m'' in round ''n''. ''m'' may be zero-padded position.
+
:: The score of team ''m'' in round ''n''. ''m'' is the zero-padded position.
  
 
== Examples ==
 
== Examples ==
Line 78: Line 81:
 
<pre style="overflow: auto;">
 
<pre style="overflow: auto;">
 
{{#invoke: TeamBracket | teamBracket
 
{{#invoke: TeamBracket | teamBracket
 +
| autoseeds  = y
 
| rounds    = 3
 
| rounds    = 3
 
| RD1-group1 = Pacific
 
| RD1-group1 = Pacific
Line 86: Line 90:
  
 
{{#invoke: TeamBracket | teamBracket
 
{{#invoke: TeamBracket | teamBracket
 +
| autoseeds  = y
 
| rounds    = 3
 
| rounds    = 3
 
| RD1-group1 = Pacific
 
| RD1-group1 = Pacific

Latest revision as of 17:15, 29 September 2020

This template implements a generic visual representation of the bracket of a single-elimination tournament with any number or rounds. For common usage, use the {{64TeamBracket}}, {{32TeamBracket}}, {{16TeamBracket}}, {{8TeamBracket}}, {{4TeamBracket}}, {{2TeamBracket}} templates.

Usage

{{#invoke: TeamBracket | teamBracket
| rounds      =

| seed-width  =
| team-width  =
| score-width =

| RD1         =
| RD1-group1  =
| RD1-seed1   =
| RD1-team1   =
| RD1-score1  =
 ...
}}

Parameter list

The parameters are as follows:

seed-width – the width of the cells for seeds.
team-width – the width of the cells for team names.
score-width – the width of the cells for scores.
seeds – set to no to hide all seeds.
compact – set to yes for compact bracket and to disable groups.
RDnThe name of round n.
RDn-groupmThe name of group m in round n.
RDn-seedmThe seed of team m in round n.
RDn-teammThe name of team m in round n.
RDn-scoremThe score of team m in round n.

Parameter descriptions

seed-width
The width of the seed cells in CSS. Examples:
N [em/%/px]
auto
team-width
The width of the team name cells in CSS.
score-width
The width of the score cells in CSS.
RDn
The name of round n. Defaults are "Round of m", ..., "Quarterfinals", "Semifinals", and "Finals", where m is the number of teams in the round.
RDn-groupm
The name of group m in round n. For each round, every set of four teams is classified as a group.
RDn-seedm
The seed of team m in round n. For round 1, this value defaults to the conventional seed allocation for tournaments. If omitted, the cell is hidden. To hide seeds for round 1, the value must be explicitly set to be empty. m is the zero-padded position.
RDn-teamm
The name of team m in round n. m is the zero-padded position.
RDn-scorem
The score of team m in round n. m is the zero-padded position.

Examples

No seeds

{{#invoke: TeamBracket | teamBracket
| rounds    = 2
| RD1-seed1 =
| RD1-seed2 =
| RD1-seed3 =
| RD1-seed4 =
}}
Semifinals Finals
      
 
 
 
 
 
 

Groups

{{#invoke: TeamBracket | teamBracket
| autoseeds  = y
| rounds     = 3
| RD1-group1 = Pacific
| RD1-group2 = Mountain
| RD2-group1 = West
}}
Quarterfinals Semifinals Finals
         
1  
8  
 
Pacific
 
5  
4  
 
West
 
3  
6  
 
Mountain
 
7  
2