Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Bracket: Difference between revisions

Template page
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
-- ================================================================
<noinclude>
-- Template:BracketMatch
== Template:Bracket ==
-- Stores one match result into the BracketMatch Cargo table.
Renders a dynamic bracket for team vs team events.
-- Place invisibly on tournament pages (inside a display:none div).
All match data is pulled from Cargo (via BracketMatch template)
-- ================================================================
but can also be overridden with inline parameters.


<noinclude>
=== Usage — GSL (4-team double elim) ===
{{#cargo_declare:
<pre>
_table    = BracketMatch
{{Bracket
|event      = String
|format = gsl
|match_id  = String
|event  = My Tournament 2026
|team1      = String
|teams  = 4
|team2      = String
|score1    = String
|score2    = String
|winner    = String
|bo        = String
|match_date = String
|casters    = String
|vod        = String
|notes      = String
}}
}}
</pre>


== Template:BracketMatch ==
=== Usage — Single Elimination (8 teams) ===
Invisible data template. Stores a single bracket match result to Cargo.
<pre>
{{Bracket
|format = single
|event  = My Tournament 2026
|teams  = 8
}}
</pre>


=== Usage ===
=== Usage — Double Elimination (8 teams) ===
<pre>
<pre>
{{BracketMatch
{{Bracket
  |event    = BGMI Masters Series 2026
  |format = double
  |match_id = UBR1M1
  |event = My Tournament 2026
|team1    = GodLike Esports
  |teams = 8
|team2    = Team SouL
|score1  = 2
  |score2  = 0
|winner  = 1
|bo      = 3
|date    = 2026-03-15 18:00
  |casters = CasterA, CasterB
|vod      = https://youtube.com/watch?v=xxx
|notes    = Played on LAN
}}
}}
</pre>
</pre>


=== Parameters ===
=== Usage — Round Robin (6 teams) ===
* '''event''' — must match the |event= passed to {{Bracket}}
<pre>
* '''match_id''' — format depends on bracket type:
{{Bracket
** Single Elim: R1M1, R2M1 (Round, Match)
|format = rr
** Double Elim: UBR1M1 (Upper), LBR1M1 (Lower), GF1, GF2
|event  = My Tournament 2026
** GSL: Q1, ELIM, Q2, FINAL
|teams  = 6
** Round Robin: RR1v2, RR1v3 etc. (lower index first)
|team1  = GodLike Esports
** Swiss: SR1M1, SR2M1 (Swiss Round, Match)
|team2  = Team SouL
* '''score1 / score2''' — map/game wins (e.g. 2, 1)
|team3  = OR Esports
* '''winner''' — "1" (team1 wins), "2" (team2 wins), or exact team name
|team4  = Team XO
* '''bo''' — best-of number (1, 3, 5)
|team5  = Entity Gaming
* '''date''' — datetime string (YYYY-MM-DD HH:MM preferred for JS timezone convert)
|team6  = Blind Esports
* '''vod''' — full URL to VOD
}}
</pre>


=== Batch usage on a tournament page ===
=== Usage — Swiss (8 teams, 5 rounds) ===
<pre>
<pre>
<div style="display:none">
{{Bracket
{{BracketMatch|event=My Tournament 2026|match_id=Q1|team1=Team A|team2=Team B|score1=2|score2=1|winner=1|bo=3}}
|format = swiss
{{BracketMatch|event=My Tournament 2026|match_id=ELIM|team1=Team C|team2=Team D|score1=0|score2=2|winner=2|bo=3}}
|event = My Tournament 2026
{{BracketMatch|event=My Tournament 2026|match_id=Q2|team1=Team B|team2=Team C|score1=2|score2=0|winner=1|bo=3}}
|teams  = 8
{{BracketMatch|event=My Tournament 2026|match_id=FINAL|team1=Team A|team2=Team B|score1=3|score2=1|winner=1|bo=5}}
|rounds = 5
</div>
}}
</pre>
</pre>


=== Notes ===
=== Inline override (no Cargo needed) ===
After creating this template, go to Special:CargoTables and recreate
You can pass match data directly as template args (useful for quick pages):
the BracketMatch table to register the new schema.
<pre>
</noinclude><includeonly>{{#cargo_store:
{{Bracket
_table    = BracketMatch
|format      = gsl
|event     = {{{event|}}}
|event       = My Tournament 2026
|match_id  = {{{match_id|}}}
|Q1team1    = GodLike Esports
|team1      = {{{team1|}}}
|Q1team2    = Team SouL
|team2      = {{{team2|}}}
|Q1score1    = 2
|score1    = {{{score1|}}}
|Q1score2    = 1
|score2    = {{{score2|}}}
|Q1win      = 1
|winner     = {{{winner|}}}
|Q1bo        = 3
|bo        = {{{bo|}}}
|ELIMteam1  = OR Esports
|match_date = {{{date|}}}
|ELIMteam2  = Entity Gaming
|casters    = {{{casters|}}}
|ELIMscore1  = 0
|vod        = {{{vod|}}}
|ELIMscore2  = 2
|notes      = {{{notes|}}}
|ELIMwin     = 2
}}</includeonly>
...
}}
</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>

Latest revision as of 00:35, 20 March 2026

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

Unknown bracket format: .... Valid: single, double, gsl, rr, swiss

wherever you want the bracket displayed

4. As matches are played, update/add BracketMatch entries — bracket updates automatically