Module:Build bracket/doc

This is an old revision of this page, as edited by Pbrks (talk | contribs) at 17:17, 25 August 2022 (Parameters). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Description

This template is intended to be used to create and edit intricate sports brackets that cannot be made by Module:RoundN or Module:Team bracket. For example, additional headers (for double-elimination brackets; 3rd-, 5th-, 7th-place matches; etc), singular omitted matches (i.e., having a horizonal line instead of a match), and N-way brackets (N teams per match). The syntax is slightly more complicated than the aforementioned brackets, but simpler than using the standard wikitable code.

The template breaks down the brackets into rows and columns.

Bracket builder

{{#invoke:Build bracket|main
| rounds =

| col1-headers = 
| col1-matches = 
| col1-lines   = 

| col2-headers = 
| col2-matches = 
| col2-lines   = 

...

| col1-col2-paths = 
| col2-col3-paths = 

...
}}
1 2 3
1
2
3
4

Note: Borders are not actually present. They are only here to help visualization.

Parameters

Parameter Description Default
rounds number of rounds (columns). 1
rows manually set the number of rows. Automatic
teams-per-match
enter the number of teams in each match. Use colm-teams-per-match to set individual columns 2
colm-headers (optional) enter the row numbers where headers are desired in column m. Separate entries with ,. Half integer values are allowed. Automatic
colm-matches enter the row numbers where a match is desired in column m. Matches take up two rows by default. Separate entries with ,. Half integer values are allowed.
colm-lines enter the row numbers where a line is desired in column m. Separate entries with ,. Half integer values are allowed.
colm-colm+1-paths enter the starting and ending row numbers, separated by -, from columns m and m+1 where a path is desired. Separate entries with ,. Half integer values are allowed.
RDm, RDmh The header text of the (alpha hth) header in round m (e.g., RD1 for the first header and RD1b for the second header in round 1).
RDm-seedk The seed of the kth team in round m. Alternatively, use RDmh-seedk for the kth team under header mh.
RDm-teamk The name of the kth team in round m. Alternatively, use RDmh-teamk for the kth team under header mh.
RDm-scorek The score of the kth team in round m. Alternatively, use RDmh-scorek for the kth team under header mh. Append the suffix -l for the lth leg or -agg for the aggregate score.
RDm-textk The text above the kth match in round m. Alternatively, use RDmh-textk for the kth match under header mh.
maxround maximum round to display. This parameter should be omitted unless it is less than the default value set by rounds.
seed-width the width of the cells for seeds. Plain numbers are assumed to be in px units (e.g., 25 or 25px 2em for 2em) 25
team-width the width of the cells for team names. Plain numbers are assumed to be in px units (e.g., 200 for 200px or 15em for 15em) 150
score-width the width of the cells for scores. Plain numbers are assumed to be in px units (e.g., 25 or 25px 2em for 2em) 25
seeds set to no to omit seeds in all rounds. yes
legs the number of legs for all rounds. Use RDm-legs to individually set columns. 1
RD-shade the background color (in hex format, e.g. #ABCDEF) of all headers. Use RDm-shade or RDmh-shade for individual headers. #F2F2F2
aggregate set to yes to add an aggregate score box to each match. Only matches with two or more legs will show the aggregate score box. no
compact set to yes to vertically condense the bracket. no
boldwinner set to yes to automatically bold the seed/team/score with the higher score in each match. no

Path codes

Path codes are entered in the form a-b, where a is associated match in the first column, and b is associated match in the second column. Path codes can be grouped; for example, (a,b)-c is equivalent to a-c, b-c.

Example Output
1-3
(1,5)-3
3-(1,5)

Examples

Note: These are only examples. Module:Team bracket and Module:RoundN handle some of these brackets much better than this template does.

Standard 4-team bracket

{{#invoke:Build bracket|main
| rounds=2

| col1-headers = 1
| col2-headers = 1

| col1-matches = 3,7
| col2-matches = 5

| col1-col2-paths = (3,7)-5

<!-- Defaults -->
| RD2 = Grand Final

| RD1-seed1 = 1
| RD1-seed3 = 2
}}
SemifinalsGrand Final
1
2

No seeds

{{#invoke:Build bracket|main
| rounds=2
| seeds = no

| col1-headers = 1
| col2-headers = 1

| col1-matches = 3
| col2-matches = 3

| col1-col2-paths = 3-3

}}
SemifinalsFinal

Legs

{{#invoke:Build bracket|main
| rounds=3
| legs=2
| RD3-legs=3

| col1-headers = 1
| col2-headers = 1
| col3-headers = 1

| col1-matches = 5
| col2-matches = 4
| col3-matches = 3

| col1-col2-paths = 5-4
| col2-col3-paths = 4-3
}}
QuarterfinalsSemifinalsFinal

3-way bracket

{{#invoke:Build bracket|main
| rounds=2
| teams-per-match = 3

| col1-headers = 1
| col2-headers = 1

| col1-matches = 3,7,11
| col2-matches = 7

| col1-col2-paths = 3-7, 7-7, 11-7
}}
SemifinalsFinal