Module:Team bracket/doc: Difference between revisions

From ytptenniswiki
Jump to navigation Jump to search
en>WOSlinker
syntaxhighlight lang="wikitext"
 
removed references to MOS
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#switch:{{NAMESPACE}}
{{#switch:{{NAMESPACE}}
| Module =  
| Module =  
{{high-use|| Wikipedia talk:High-risk templates}}
{{Module rating |release}}
{{Module rating |release}}


This module implements a generic visual representation of the bracket of a [[single-elimination tournament]] with any number of rounds. For common usage, use the {{tl|64TeamBracket}}, {{tl|32TeamBracket}}, {{tl|16TeamBracket}}, {{tl|8TeamBracket}}, {{tl|4TeamBracket}}, {{tl|2TeamBracket}} templates.
This module implements a generic visual representation of the bracket of a single-elimination tournament with any number of rounds. For common usage, use the other common templates.
| #default =  
| #default =  
__NOEDITSECTION__
__NOEDITSECTION__
{{lua|Module:Team bracket}}
{{lua|Module:Team bracket}}
This template implements a generic visual representation of the bracket of a [[single-elimination tournament]] with {{#ifeq:{{{rounds|}}}|1|one round|{{{rounds|any number of}}} rounds}}.
This template implements a generic visual representation of the bracket of a single-elimination tournament with {{#ifeq:{{{rounds|}}}|1|one round|{{{rounds|any number of}}} rounds}}.
}}
}}
== Usage ==
== Usage ==
Line 33: Line 32:
  ...</nowiki>
  ...</nowiki>
{{))}}|lang="wikitext"}}
{{))}}|lang="wikitext"}}
Per [[MOS:ACCESS#Font size]] and [[MOS:SMALLFONT]], "avoid using smaller font sizes in elements that already use a smaller font size, such as infoboxes, navboxes and reference sections".  Since this template's text is already reduced to 90% of the normal size, use of the {{tl|Small}} template or {{tag|small}} tags within this template produces a font size that is 77% of the page default, well below the 85% minimum specified in the linked guidelines.
Per MOS:ACCESS#Font size and MOS:SMALLFONT, "avoid using smaller font sizes in elements that already use a smaller font size, such as infoboxes, navboxes and reference sections".  Since this template's text is already reduced to 90% of the normal size, use of the {{tl|Small}} template or {{tag|small}} tags within this template produces a font size that is 77% of the page default, well below the 85% minimum specified in the linked guidelines.
}}
}}
=== Parameters ===
=== Parameters ===
Line 289: Line 288:
|rounds=3|byes=1|legs=3/5/5|sepwidth=1|boldwinner=high|hideomittedscores = 1
|rounds=3|byes=1|legs=3/5/5|sepwidth=1|boldwinner=high|hideomittedscores = 1


|RD1-seed3=4|RD1-team3=[[BC Vienna|Hallmann Vienna]]|RD1-score3-1=80|RD1-score3-2=66|RD1-score3-3=64
|RD1-seed3=4|RD1-team3=Zinglesburg Hongos|RD1-score3-1=80|RD1-score3-2=66|RD1-score3-3=64
|RD1-seed4=5|RD1-team4=[[WBC Wels|WBC Raiffeisen Wels]]|RD1-score4-1=64|RD1-score4-2=81|RD1-score4-3=69
|RD1-seed4=5|RD1-team4=North Poopenstein Frog Fellaz|RD1-score4-1=64|RD1-score4-2=81|RD1-score4-3=69


|RD1-seed7=3|RD1-team7=[[Kapfenberg Bulls|ece Bulls Kapfenberg]]|RD1-score7-1=97|RD1-score7-2=95
|RD1-seed7=3|RD1-team7=Billy Bob Potato Chip Factory|RD1-score7-1=97|RD1-score7-2=95
|RD1-seed8=6|RD1-team8=[[Arkadia Traiskirchen Lions]]|RD1-score8-1=80|RD1-score8-2=82
|RD1-seed8=6|RD1-team8=THE SPINGLER|RD1-score8-1=80|RD1-score8-2=82
<!--SF-->
<!--SF-->
|RD2-seed1=1|RD2-team1=[[Oberwart Gunners|Redwell Gunners Oberwart]]|RD2-score1-1=75|RD2-score1-2=89|RD2-score1-3=57|RD2-score1-4=79|RD2-score1-5=77
|RD2-seed1=1|RD2-team1=(unknown)|RD2-score1-1=75|RD2-score1-2=89|RD2-score1-3=57|RD2-score1-4=79|RD2-score1-5=77
|RD2-seed2=5|RD2-team2=[[WBC Wels|WBC Raiffeisen Wels]]|RD2-score2-1=84|RD2-score2-2=83|RD2-score2-3=63|RD2-score2-4=62|RD2-score2-5=67
|RD2-seed2=5|RD2-team2=North Poopenstein Frog Fellaz|RD2-score2-1=84|RD2-score2-2=83|RD2-score2-3=63|RD2-score2-4=62|RD2-score2-5=67


|RD2-seed3=2|RD2-team3=[[Swans Gmunden]]|RD2-score3-1=73|RD2-score3-2=79|RD2-score3-3=68|RD2-score3-4=59
|RD2-seed3=2|RD2-team3=Jalen Hurts|RD2-score3-1=73|RD2-score3-2=79|RD2-score3-3=68|RD2-score3-4=59
|RD2-seed4=3|RD2-team4=[[Kapfenberg Bulls|ece Bulls Kapfenberg]]|RD2-score4-1=92|RD2-score4-2=65|RD2-score4-3=81|RD2-score4-4=61
|RD2-seed4=3|RD2-team4=Billy Bob Potato Chip Factory|RD2-score4-1=92|RD2-score4-2=65|RD2-score4-3=81|RD2-score4-4=61
<!--F-->
<!--F-->
|RD3-seed1=1|RD3-team1=[[Oberwart Gunners|Redwell Gunners Oberwart]]|RD3-score1-1=61|RD3-score1-2=56|RD3-score1-3=55|RD3-score1-4=72|RD3-score1-5=64
|RD3-seed1=1|RD3-team1=(unknown)|RD3-score1-1=61|RD3-score1-2=56|RD3-score1-3=55|RD3-score1-4=72|RD3-score1-5=64
|RD3-seed2=3|RD3-team2=[[Kapfenberg Bulls|ece Bulls Kapfenberg]]|RD3-score2-1=57|RD3-score2-2=66|RD3-score2-3=56|RD3-score2-4=73|RD3-score2-5=73
|RD3-seed2=3|RD3-team2=Billy Bob Potato Chip Factory|RD3-score2-1=57|RD3-score2-2=66|RD3-score2-3=56|RD3-score2-4=73|RD3-score2-5=73
}}
}}
</pre>
</pre>
Line 308: Line 307:
|rounds=3|byes=1|legs=3/5/5|sepwidth=1|boldwinner=high|hideomittedscores = 1
|rounds=3|byes=1|legs=3/5/5|sepwidth=1|boldwinner=high|hideomittedscores = 1


|RD1-seed3=4|RD1-team3=[[BC Vienna|Hallmann Vienna]]|RD1-score3-1=80|RD1-score3-2=66|RD1-score3-3=64
|RD1-seed3=4|RD1-team3=Zinglesburg Hongos|RD1-score3-1=80|RD1-score3-2=66|RD1-score3-3=64
|RD1-seed4=5|RD1-team4=[[WBC Wels|WBC Raiffeisen Wels]]|RD1-score4-1=64|RD1-score4-2=81|RD1-score4-3=69
|RD1-seed4=5|RD1-team4=North Poopenstein Frog Fellaz|RD1-score4-1=64|RD1-score4-2=81|RD1-score4-3=69


|RD1-seed7=3|RD1-team7=[[Kapfenberg Bulls|ece Bulls Kapfenberg]]|RD1-score7-1=97|RD1-score7-2=95
|RD1-seed7=3|RD1-team7=Billy Bob Potato Chip Factory|RD1-score7-1=97|RD1-score7-2=95
|RD1-seed8=6|RD1-team8=[[Arkadia Traiskirchen Lions]]|RD1-score8-1=80|RD1-score8-2=82
|RD1-seed8=6|RD1-team8=THE SPINGLER|RD1-score8-1=80|RD1-score8-2=82
<!--SF-->
<!--SF-->
|RD2-seed1=1|RD2-team1=[[Oberwart Gunners|Redwell Gunners Oberwart]]|RD2-score1-1=75|RD2-score1-2=89|RD2-score1-3=57|RD2-score1-4=79|RD2-score1-5=77
|RD2-seed1=1|RD2-team1=(unknown)|RD2-score1-1=75|RD2-score1-2=89|RD2-score1-3=57|RD2-score1-4=79|RD2-score1-5=77
|RD2-seed2=5|RD2-team2=[[WBC Wels|WBC Raiffeisen Wels]]|RD2-score2-1=84|RD2-score2-2=83|RD2-score2-3=63|RD2-score2-4=62|RD2-score2-5=67
|RD2-seed2=5|RD2-team2=North Poopenstein Frog Fellaz|RD2-score2-1=84|RD2-score2-2=83|RD2-score2-3=63|RD2-score2-4=62|RD2-score2-5=67


|RD2-seed3=2|RD2-team3=[[Swans Gmunden]]|RD2-score3-1=73|RD2-score3-2=79|RD2-score3-3=68|RD2-score3-4=59
|RD2-seed3=2|RD2-team3=Jalen Hurts|RD2-score3-1=73|RD2-score3-2=79|RD2-score3-3=68|RD2-score3-4=59
|RD2-seed4=3|RD2-team4=[[Kapfenberg Bulls|ece Bulls Kapfenberg]]|RD2-score4-1=92|RD2-score4-2=65|RD2-score4-3=81|RD2-score4-4=61
|RD2-seed4=3|RD2-team4=Billy Bob Potato Chip Factory|RD2-score4-1=92|RD2-score4-2=65|RD2-score4-3=81|RD2-score4-4=61
<!--F-->
<!--F-->
|RD3-seed1=1|RD3-team1=[[Oberwart Gunners|Redwell Gunners Oberwart]]|RD3-score1-1=61|RD3-score1-2=56|RD3-score1-3=55|RD3-score1-4=72|RD3-score1-5=64
|RD3-seed1=1|RD3-team1=(unknown)|RD3-score1-1=61|RD3-score1-2=56|RD3-score1-3=55|RD3-score1-4=72|RD3-score1-5=64
|RD3-seed2=3|RD3-team2=[[Kapfenberg Bulls|ece Bulls Kapfenberg]]|RD3-score2-1=57|RD3-score2-2=66|RD3-score2-3=56|RD3-score2-4=73|RD3-score2-5=73
|RD3-seed2=3|RD3-team2=Billy Bob Potato Chip Factory|RD3-score2-1=57|RD3-score2-2=66|RD3-score2-3=56|RD3-score2-4=73|RD3-score2-5=73
}}
}}
|#default=
|#default=
Line 332: Line 331:
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go here, and interwikis go in Wikidata -->
<!-- Categories go here, and interwikis go in Wikidata -->
[[Category:Sports modules]]
<!-- THIS WAS CHANGED FROM "Sports Modules" -->
[[Category:Bracket modules]]


}}</includeonly>
}}</includeonly>

Latest revision as of 00:01, 12 March 2025

This module implements a generic visual representation of the bracket of a single-elimination tournament with any number of rounds. For common usage, use the other common templates.

Usage

{{#invoke: Team bracket | main
| rounds      =
| RD1-group1  =

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

Parameters

Parameter Description
rounds number of rounds. Use 1 for a 2 team bracket, 2 for a 4 team bracket, 3 for an 8 team bracket, ...
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 or auto for automatic width sizing)
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 or auto for automatic width sizing)
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 or auto for automatic width sizing)
compact set to yes for compact bracket and to disable groups.
seeds set to no to omit seed cells, and yes to always show seed cells
sets or legs the number of sets/legs in each round of matches (delimit with / for different numbers of sets or legs per round)
nowrap set to yes to prevent lines from wrapping
byes set to 1, 2, ... to specify the maximum round number with byes
boldwinner set to high to automatically bold the seed/team/scores for the team with the highest score, and low for the lowest score
hideomittedscores set to 1 to hide all omitted score cells. To only omit score cells from the second set or leg onwards, use 2
sepwidth set to 1 or 2 to override the default separator width
headings set to no to omit the column headings
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.
RDn-scorem The score of team m in round n.
RDn-scorem-s The score of team m in round n and set s (or leg for multileg matches). Alternatively, the last score in the round can be specified using the -agg suffix.
RD1-omit Selectively omit teams from the first round. For example, use 1 / 2 / 5 / 6 to omit team1, team2, team5, and team6 from the first round.
RD-shade Background color for the RDn headings
RDn-shadem-s Background coloring for team m in round n and set s (or leg for multileg matches).
RDn-RDn+1-path Set to 0 to omit the path between round n and round n+1.
float Float the bracket to the left or right or center or centre of the page.
clear Set to no to prevent "clearing" the left/right side of the page before floating to the left/right. This parameter is only valid with |float=left or |float=right.
aggregate Set to sets or legs to sum the sets/legs won and append to the end of the scores. Set to score to sum the scores from each set/leg and append to the end of the scores. Set to y or yes to enable the -agg suffix, but without any auto computation. Only works when there are two or more legs/sets in the round. Any automatically computed value can be overridden by setting the value manually with the -agg suffix for the score.

Examples

No seeds

{{#invoke: Team bracket | main
| rounds    = 2
| seeds     = no
}}
Semifinals Finals
    
 
 
 
 
 
 

Compact

{{#invoke: Team bracket | main
| rounds    = 2
| compact   = yes
}}
Semifinals Finals
 
   
   
 

Third place

{{#invoke: Team bracket | main
| rounds    = 2
| seeds     = no
| RD2b      = Third place
}}
Semifinals Finals
    
 
 
 
 
 
  Third place
 
 

Groups

{{#invoke: Team bracket | main
| 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  

Sets

{{#invoke: Team bracket | main
| autoseeds  = y
| rounds     = 3
| sets       = 3 / 5 / 5
}}
Quarterfinals Semifinals Finals
                   
1  
8  
 
 
5  
4  
 
 
3  
6  
 
 
7  
2  

Aggregate

{{#invoke: Team bracket | main
| autoseeds  = y
| rounds     = 3
| legs       = 2
| aggregate  = y
}}
Quarterfinals Semifinals Finals
               
1  
8  
 
 
5  
4  
 
 
3  
6  
 
 
7  
2  

Bold winner with byes and hide omitted scores

{{#invoke: Team bracket | main
|rounds=3|byes=1|legs=3/5/5|sepwidth=1|boldwinner=high|hideomittedscores = 1

|RD1-seed3=4|RD1-team3=Zinglesburg Hongos|RD1-score3-1=80|RD1-score3-2=66|RD1-score3-3=64
|RD1-seed4=5|RD1-team4=North Poopenstein Frog Fellaz|RD1-score4-1=64|RD1-score4-2=81|RD1-score4-3=69

|RD1-seed7=3|RD1-team7=Billy Bob Potato Chip Factory|RD1-score7-1=97|RD1-score7-2=95
|RD1-seed8=6|RD1-team8=THE SPINGLER|RD1-score8-1=80|RD1-score8-2=82
<!--SF-->
|RD2-seed1=1|RD2-team1=(unknown)|RD2-score1-1=75|RD2-score1-2=89|RD2-score1-3=57|RD2-score1-4=79|RD2-score1-5=77
|RD2-seed2=5|RD2-team2=North Poopenstein Frog Fellaz|RD2-score2-1=84|RD2-score2-2=83|RD2-score2-3=63|RD2-score2-4=62|RD2-score2-5=67

|RD2-seed3=2|RD2-team3=Jalen Hurts|RD2-score3-1=73|RD2-score3-2=79|RD2-score3-3=68|RD2-score3-4=59
|RD2-seed4=3|RD2-team4=Billy Bob Potato Chip Factory|RD2-score4-1=92|RD2-score4-2=65|RD2-score4-3=81|RD2-score4-4=61
<!--F-->
|RD3-seed1=1|RD3-team1=(unknown)|RD3-score1-1=61|RD3-score1-2=56|RD3-score1-3=55|RD3-score1-4=72|RD3-score1-5=64
|RD3-seed2=3|RD3-team2=Billy Bob Potato Chip Factory|RD3-score2-1=57|RD3-score2-2=66|RD3-score2-3=56|RD3-score2-4=73|RD3-score2-5=73
}}
Quarterfinals Semifinals Finals
                   
1 (unknown) 75 89 57 79 77
5 North Poopenstein Frog Fellaz 84 83 63 62 67
4 Zinglesburg Hongos 80 66 64
5 North Poopenstein Frog Fellaz 64 81 69
1 (unknown) 61 56 55 72 64
3 Billy Bob Potato Chip Factory 57 66 56 73 73
2 Jalen Hurts 73 79 68 59
3 Billy Bob Potato Chip Factory 92 65 81 61
3 Billy Bob Potato Chip Factory 97 95
6 THE SPINGLER 80 82

See also