Template:Bracket: Difference between revisions
More actions
Esportsamaze (talk | contribs) No edit summary |
Esportsamaze (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
-- ================================================================ | -- ================================================================ | ||
-- Template: | -- Template:Bracket | ||
-- | -- Main entry point. Invokes Module:Bracket with the chosen format. | ||
-- ================================================================ | -- ================================================================ | ||
<noinclude> | <noinclude> | ||
== Template:Bracket == | |||
Renders a dynamic bracket for team vs team events. | |||
All match data is pulled from Cargo (via BracketMatch template) | |||
but can also be overridden with inline parameters. | |||
=== Usage — GSL (4-team double elim) === | |||
<pre> | |||
{{Bracket | |||
|format = gsl | |||
|event = My Tournament 2026 | |||
|teams = 4 | |||
| | |||
| | |||
| | |||
}} | }} | ||
</pre> | |||
== | === Usage — Single Elimination (8 teams) === | ||
<pre> | |||
{{Bracket | |||
|format = single | |||
|event = My Tournament 2026 | |||
|teams = 8 | |||
}} | |||
</pre> | |||
=== Usage — Double Elimination (8 teams) === | |||
<pre> | |||
{{Bracket | |||
|format = double | |||
|event = My Tournament 2026 | |||
|teams = 8 | |||
}} | |||
</pre> | |||
=== Usage === | === Usage — Round Robin (6 teams) === | ||
<pre> | <pre> | ||
{{ | {{Bracket | ||
|event | |format = rr | ||
| | |event = My Tournament 2026 | ||
|team1 | |teams = 6 | ||
|team2 | |team1 = GodLike Esports | ||
| | |team2 = Team SouL | ||
|team3 = OR Esports | |||
|team4 = Team XO | |||
| | |team5 = Entity Gaming | ||
|team6 = Blind Esports | |||
| | |||
| | |||
}} | }} | ||
</pre> | </pre> | ||
=== | === Usage — Swiss (8 teams, 5 rounds) === | ||
<pre> | |||
{{Bracket | |||
|format = swiss | |||
|event = My Tournament 2026 | |||
|teams = 8 | |||
|rounds = 5 | |||
}} | |||
</pre> | |||
=== | === Inline override (no Cargo needed) === | ||
You can pass match data directly as template args (useful for quick pages): | |||
<pre> | <pre> | ||
{{Bracket | |||
|format = gsl | |||
|event = My Tournament 2026 | |||
|Q1team1 = GodLike Esports | |||
|Q1team2 = Team SouL | |||
|Q1score1 = 2 | |||
|Q1score2 = 1 | |||
|Q1win = 1 | |||
|Q1bo = 3 | |||
|ELIMteam1 = OR Esports | |||
|ELIMteam2 = Entity Gaming | |||
|ELIMscore1 = 0 | |||
|ELIMscore2 = 2 | |||
|ELIMwin = 2 | |||
... | |||
}} | |||
</pre> | </pre> | ||
=== | === Parameters === | ||
* '''format''' — single / double / gsl / rr / swiss | |||
* '''event''' — event name (must match BracketMatch records) | |||
* '''teams''' — team count (4, 8, 16, 32 for SE/DE; any even for RR/Swiss) | |||
* '''rounds''' — (Swiss only) number of rounds, default 5 | |||
* Round name overrides: r1name=, r2name=, ubr1name=, lbr1name=, q1name=, q2name=, elimname=, finalname= | |||
=== Workflow === | |||
1. Create tournament page | |||
2. Add hidden BracketMatch templates for each match result | |||
3. Add {{Bracket|format=...|event=...}} wherever you want the bracket displayed | |||
4. As matches are played, update/add BracketMatch entries — bracket updates automatically | |||
</noinclude><includeonly>{{#invoke:Bracket|main}}</includeonly> | |||
}}</includeonly> | |||
Revision as of 00:13, 20 March 2026
-- ================================================================ -- Template:Bracket -- Main entry point. Invokes Module:Bracket with the chosen format. -- ================================================================
Template:Bracket
Renders a dynamic bracket for team vs team events. All match data is pulled from Cargo (via BracketMatch template) but can also be overridden with inline parameters.
Usage — GSL (4-team double elim)
{{Bracket
|format = gsl
|event = My Tournament 2026
|teams = 4
}}
Usage — Single Elimination (8 teams)
{{Bracket
|format = single
|event = My Tournament 2026
|teams = 8
}}
Usage — Double Elimination (8 teams)
{{Bracket
|format = double
|event = My Tournament 2026
|teams = 8
}}
Usage — Round Robin (6 teams)
{{Bracket
|format = rr
|event = My Tournament 2026
|teams = 6
|team1 = GodLike Esports
|team2 = Team SouL
|team3 = OR Esports
|team4 = Team XO
|team5 = Entity Gaming
|team6 = Blind Esports
}}
Usage — Swiss (8 teams, 5 rounds)
{{Bracket
|format = swiss
|event = My Tournament 2026
|teams = 8
|rounds = 5
}}
Inline override (no Cargo needed)
You can pass match data directly as template args (useful for quick pages):
{{Bracket
|format = gsl
|event = My Tournament 2026
|Q1team1 = GodLike Esports
|Q1team2 = Team SouL
|Q1score1 = 2
|Q1score2 = 1
|Q1win = 1
|Q1bo = 3
|ELIMteam1 = OR Esports
|ELIMteam2 = Entity Gaming
|ELIMscore1 = 0
|ELIMscore2 = 2
|ELIMwin = 2
...
}}
Parameters
- format — single / double / gsl / rr / swiss
- event — event name (must match BracketMatch records)
- teams — team count (4, 8, 16, 32 for SE/DE; any even for RR/Swiss)
- rounds — (Swiss only) number of rounds, default 5
- Round name overrides: r1name=, r2name=, ubr1name=, lbr1name=, q1name=, q2name=, elimname=, finalname=
Workflow
1. Create tournament page 2. Add hidden BracketMatch templates for each match result 3. Add -- ================================================================ -- Template:Bracket -- Main entry point. Invokes Module:Bracket with the chosen format. -- ================================================================
wherever you want the bracket displayed
4. As matches are played, update/add BracketMatch entries — bracket updates automatically