Template:Bracket: Difference between revisions
More actions
Esportsamaze (talk | contribs) Created page with "<noinclude> Usage: {{Bracket|teams=8 |R1M1team1=Team A |R1M1score1=2 |R1M1team2=Team B |R1M1score2=1 |R1M1win=1 ... }} </noinclude><includeonly>{{#invoke:Bracket|main}}</includeonly>" |
Esportsamaze (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
-- ================================================================ | |||
-- Template:BracketMatch | |||
-- Stores one match result into the BracketMatch Cargo table. | |||
-- Place invisibly on tournament pages (inside a display:none div). | |||
-- ================================================================ | |||
<noinclude> | <noinclude> | ||
{{#cargo_declare: | |||
_table = BracketMatch | |||
| | |event = String | ||
|match_id = String | |||
|team1 = String | |||
|team2 = String | |||
|score1 = String | |||
|score2 = String | |||
|winner = String | |||
|bo = String | |||
|match_date = String | |||
|casters = String | |||
|vod = String | |||
|notes = String | |||
}} | }} | ||
</noinclude><includeonly>{{# | |||
== Template:BracketMatch == | |||
Invisible data template. Stores a single bracket match result to Cargo. | |||
=== Usage === | |||
<pre> | |||
{{BracketMatch | |||
|event = BGMI Masters Series 2026 | |||
|match_id = UBR1M1 | |||
|team1 = GodLike Esports | |||
|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> | |||
=== Parameters === | |||
* '''event''' — must match the |event= passed to {{Bracket}} | |||
* '''match_id''' — format depends on bracket type: | |||
** Single Elim: R1M1, R2M1 (Round, Match) | |||
** Double Elim: UBR1M1 (Upper), LBR1M1 (Lower), GF1, GF2 | |||
** GSL: Q1, ELIM, Q2, FINAL | |||
** Round Robin: RR1v2, RR1v3 etc. (lower index first) | |||
** Swiss: SR1M1, SR2M1 (Swiss Round, Match) | |||
* '''score1 / score2''' — map/game wins (e.g. 2, 1) | |||
* '''winner''' — "1" (team1 wins), "2" (team2 wins), or exact team name | |||
* '''bo''' — best-of number (1, 3, 5) | |||
* '''date''' — datetime string (YYYY-MM-DD HH:MM preferred for JS timezone convert) | |||
* '''vod''' — full URL to VOD | |||
=== Batch usage on a tournament page === | |||
<pre> | |||
<div style="display:none"> | |||
{{BracketMatch|event=My Tournament 2026|match_id=Q1|team1=Team A|team2=Team B|score1=2|score2=1|winner=1|bo=3}} | |||
{{BracketMatch|event=My Tournament 2026|match_id=ELIM|team1=Team C|team2=Team D|score1=0|score2=2|winner=2|bo=3}} | |||
{{BracketMatch|event=My Tournament 2026|match_id=Q2|team1=Team B|team2=Team C|score1=2|score2=0|winner=1|bo=3}} | |||
{{BracketMatch|event=My Tournament 2026|match_id=FINAL|team1=Team A|team2=Team B|score1=3|score2=1|winner=1|bo=5}} | |||
</div> | |||
</pre> | |||
=== Notes === | |||
After creating this template, go to Special:CargoTables and recreate | |||
the BracketMatch table to register the new schema. | |||
</noinclude><includeonly>{{#cargo_store: | |||
_table = BracketMatch | |||
|event = {{{event|}}} | |||
|match_id = {{{match_id|}}} | |||
|team1 = {{{team1|}}} | |||
|team2 = {{{team2|}}} | |||
|score1 = {{{score1|}}} | |||
|score2 = {{{score2|}}} | |||
|winner = {{{winner|}}} | |||
|bo = {{{bo|}}} | |||
|match_date = {{{date|}}} | |||
|casters = {{{casters|}}} | |||
|vod = {{{vod|}}} | |||
|notes = {{{notes|}}} | |||
}}</includeonly> | |||
Revision as of 00:12, 20 March 2026
-- ================================================================ -- Template:BracketMatch -- Stores one match result into the BracketMatch Cargo table. -- Place invisibly on tournament pages (inside a display:none div). -- ================================================================
This template defines the table "BracketMatch". View table.
Template:BracketMatch
Invisible data template. Stores a single bracket match result to Cargo.
Usage
{{BracketMatch
|event = BGMI Masters Series 2026
|match_id = UBR1M1
|team1 = GodLike Esports
|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
}}
Parameters
- event — must match the |event= passed to -- ================================================================
-- Template:BracketMatch -- Stores one match result into the BracketMatch Cargo table. -- Place invisibly on tournament pages (inside a display:none div). -- ================================================================
- match_id — format depends on bracket type:
- Single Elim: R1M1, R2M1 (Round, Match)
- Double Elim: UBR1M1 (Upper), LBR1M1 (Lower), GF1, GF2
- GSL: Q1, ELIM, Q2, FINAL
- Round Robin: RR1v2, RR1v3 etc. (lower index first)
- Swiss: SR1M1, SR2M1 (Swiss Round, Match)
- score1 / score2 — map/game wins (e.g. 2, 1)
- winner — "1" (team1 wins), "2" (team2 wins), or exact team name
- bo — best-of number (1, 3, 5)
- date — datetime string (YYYY-MM-DD HH:MM preferred for JS timezone convert)
- vod — full URL to VOD
Batch usage on a tournament page
<div style="display:none">
{{BracketMatch|event=My Tournament 2026|match_id=Q1|team1=Team A|team2=Team B|score1=2|score2=1|winner=1|bo=3}}
{{BracketMatch|event=My Tournament 2026|match_id=ELIM|team1=Team C|team2=Team D|score1=0|score2=2|winner=2|bo=3}}
{{BracketMatch|event=My Tournament 2026|match_id=Q2|team1=Team B|team2=Team C|score1=2|score2=0|winner=1|bo=3}}
{{BracketMatch|event=My Tournament 2026|match_id=FINAL|team1=Team A|team2=Team B|score1=3|score2=1|winner=1|bo=5}}
</div>
Notes
After creating this template, go to Special:CargoTables and recreate the BracketMatch table to register the new schema.