Difference between revisions of "Template:Infobox tournament"

From blackwiki
Jump to navigation Jump to search
imported>Kwib
(created)
 
imported>Jonesey95
(Fix too small font per MOS:FONTSIZE.)
 
(77 intermediate revisions by 20 users not shown)
Line 1: Line 1:
{| class="infobox" style="width: 20em;"
+
{{Infobox
|-
+
| title = {{If empty|{{{name|{{{tournament_name|}}}}}}|{{PAGENAMEBASE}}}}
| colspan="2" style="text-align: center; font-size: larger;" | '''{{{tournament_name}}}'''
 
|-
 
| colspan="2" style="text-align: center;" | {{{image}}}
 
|-
 
! style="background: #ccccff;" colspan="2" | Tournament information
 
|-
 
| '''Location''' || {{{location}}}
 
|-
 
| '''Established''' || {{{establishment}}}
 
|-
 
| '''Format''' || {{{format}}}
 
|-
 
{{#if: {{{purse|<noinclude>-</noinclude>}}} |
 
{{!}}'''Purse'''
 
{{!}} {{{purse}}}
 
{{!}}-
 
}}
 
|-
 
{{#if: {{{month_played|<noinclude>-</noinclude>}}} |
 
{{!}}'''Month Played'''
 
{{!}} {{{month_played}}}
 
{{!}}-
 
}}
 
|-
 
{{#if: {{{final year|<noinclude>-</noinclude>}}} |
 
{{!}}'''Final Year'''
 
{{!}} {{{final year}}}
 
{{!}}-
 
}}
 
|-
 
{{#if: {{{defunct|<noinclude>-</noinclude>}}} |
 
{{!}}'''Defunct'''
 
{{!}} {{{defunct}}}
 
{{!}}-
 
}}
 
|-
 
{{#if: {{{Current Champion<includeonly>|</includeonly>}}} |
 
{{!}} colspan="2" bgcolor="#ccccff" align=center {{!}} '''Current champion'''
 
}}
 
|-
 
{{#if: {{{Current Champion<includeonly>|</includeonly>}}} |
 
{{!}} colspan="2" align=center {{!}} {{{Current Champion}}}
 
}}
 
|-
 
{{#if: {{{Final Champion<includeonly>|</includeonly>}}} |
 
{{!}} colspan="2" bgcolor="#ccccff" align=center {{!}} '''Final champion'''
 
}}
 
|-
 
{{#if: {{{Final Champion<includeonly>|</includeonly>}}} |
 
{{!}} colspan="2" align=center {{!}} {{{Final Champion}}}
 
}}
 
|}<noinclude>
 
  
==Empty syntax==
+
| headerstyle = background:lavender
<pre>
+
| subheaderstyle = background:lavender
{{Infobox_General_Tournament
+
| subheader = {{{year|}}}
|tournament_name =  
 
|image =  
 
|location =  
 
|establishment =
 
|format =
 
|purse =
 
|month_played = <!--Use if still played-->
 
|final year= <!--Use if no longer played-->
 
|defunct = <!--optional-->
 
|Current Champion = <!--Use if still played-->
 
|Final Champion = <!--Use if no longer played-->
 
}}
 
</pre>
 
  
 +
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|}}}|sizedefault=frameless|alt={{{alt|}}}}}
 +
| caption = {{{caption|}}}
  
[[Category:Sports infobox templates]]
+
| header1 = <includeonly>Tournament information</includeonly>
 +
 
 +
| labelstyle = white-space: nowrap
 +
 
 +
| label2 = {{#if:{{{game|}}}|Game|{{#if:{{{sport|}}}|Sport}} }}
 +
| data2 = {{{game|{{{sport|}}}}}}
 +
 
 +
| label3 = Location
 +
| data3 = {{{location|}}}
 +
 
 +
| label4 = Date{{#if:{{{date|}}}||s}}
 +
| data4  = {{#if:{{{date|}}}|{{{date}}}|{{#if:{{{start_date|}}} | {{{start_date}}}–{{{end_date|}}} }}}}
 +
 
 +
| label5 = Month played
 +
| data5 = {{{month_played|{{{month played|}}}}}}
 +
 
 +
| label6 = Established
 +
| data6 = {{{established|{{{establishment|}}}
 +
}}}
 +
 
 +
| label7 = Defunct
 +
| data7 = {{{defunct|}}}
 +
 
 +
| label8 = Final year
 +
| data8 = {{{final_year|{{{final year|}}} }}}
 +
 
 +
| label9 = {{longitem|Number of<br>tournaments}}
 +
| data9 = {{{number|}}}
 +
 
 +
| label10  = Administrator(s)
 +
| data10 = {{{administrator|{{{administrators|}}}}}}
 +
 
 +
| label11 = Format
 +
| data11 = {{{format|}}}
 +
 
 +
| label12 = {{longitem|Tournament<br>format(s)}}
 +
| data12  = {{{tournament_format|{{{tournament format|}}}}}}
 +
 
 +
| label13 = Host(s)
 +
| data13  = {{{host|}}}
 +
 
 +
| label14 = {{#if:{{{venues|}}}|Venue(s)|Venue}}
 +
| data14  = {{#if:{{{venues|}}}|{{{venues|}}}|{{{venue|}}}}}
 +
 
 +
| label15 = {{#if:{{{participants|}}}|Participants|Teams}}
 +
| data15  = {{#if:{{{participants|}}}|{{{participants}}}|{{{teams|}}}}}
 +
 
 +
| label16 = {{longitem|Number of<br>events}}
 +
| data16 = {{{events|}}}
 +
 
 +
| label17 = Purse
 +
| data17  = {{{purse|}}}
 +
 
 +
| label18 = Broadcast
 +
| dat17  = {{{broadcast|}}}
 +
 
 +
| label19 = Website
 +
| data19  = {{{website|}}}
 +
 
 +
| header20 = {{#if:{{{champion|}}}{{{champions|}}}{{{runner-up1|}}}{{{runners-up1|}}}{{{runner-up2|}}}{{{runners-up2|}}}|Final positions}}
 +
 
 +
| label21  = {{#if:{{{champion|}}}|Champion|Champions}}
 +
| data21  = {{#if:{{{champion|}}}|{{{champion}}}|{{{champions|}}}}}
 +
 
 +
| label22  = {{#if:{{{2nd place|}}}|2nd place|{{#if:{{{runner-up2|}}}|1st runner-up|{{#if:{{{runners-up2|}}}|1st runners-up|Runner-up}}}}}}
 +
| data22  = {{if empty|{{{2nd place|}}}|{{{runner-up1|}}}|{{{runners-up1|}}}}}
 +
 
 +
| label23  = {{#if:{{{3rd place|}}}|3rd place|{{#if:{{{runner-up2|}}}|2nd runner-up|2nd runners-up}}}}
 +
| data23  = {{if empty|{{{3rd place|}}}|{{{runner-up2|}}}|{{{runners-up2|}}}}}
 +
 
 +
| header24 = {{#if:{{{matches|}}}{{{goals|}}}{{{attendance|}}}{{{top_scorer|}}}{{{best_player|}}}{{{stat1|}}}{{{stat2|}}}{{{stat3|}}}|Tournament statistics}}
 +
 
 +
| label25  = Matches&nbsp;played
 +
| data25  = {{{matches|}}}
 +
 
 +
| label26  = Goals&nbsp;scored
 +
| data26  = {{{goals|}}} {{#if:{{both|{{{matches|}}}|{{{goals|}}}}}|{{#iferror:{{#expr:{{{goals|}}}/{{{matches|}}}}}||({{#expr:{{{goals|}}}/{{{matches|}}} round 2}} per match)}}}}
 +
 
 +
| label27  = Points&nbsp;scored
 +
| data27  = {{{points|}}} {{#if:{{both|{{{matches|}}}|{{{points|}}}}}|{{#iferror:{{#expr:{{{points|}}}/{{{matches|}}}}}||({{#expr:{{{points|}}}/{{{matches|}}} round 2}} per match)}}}}
 +
 
 +
| label28  = Tries&nbsp;scored
 +
| data28  = {{{tries|}}} {{#if:{{both|{{{matches|}}}|{{{tries|}}}}}|{{#iferror:{{#expr:{{{tries|}}}/{{{matches|}}}}}||({{#expr:{{{tries|}}}/{{{matches|}}} round 2}} per match)}}}}
 +
 
 +
| label29  = Attendance
 +
| data29  = {{#if:{{{attendance|}}}|{{formatnum: {{{attendance|0}}}}}{{#ifeq:{{{noaverage|}}}|1||{{#if:{{{matches|}}}|&nbsp;({{formatnum: {{#expr: {{{attendance|0}}} / {{{matches|1}}} round 0}}}} per match)}}}}}}
 +
 
 +
| label30 = {{#if:{{{mvp_label|}}}|{{{mvp_label}}}|[[Most valuable player|MVP]]}}
 +
| data30  = {{{mvp|}}}
 +
 
 +
| label31 = Top scorer(s)
 +
| data31  = {{{top_scorer|}}}
 +
 
 +
| label32 = Top&nbsp;try&nbsp;scorer(s)
 +
| data32  = {{{top_try_scorer|}}}
 +
 
 +
| label33 = {{{stat1_label}}}
 +
| data33  = {{#if:{{{stat1_label}}}| {{{stat1|}}} }}
 +
 
 +
| label34 = {{{stat2_label}}}
 +
| data34  = {{#if:{{{stat2_label}}}| {{{stat2|}}} }}
 +
 
 +
| label35 = {{{stat3_label}}}
 +
| data35  = {{#if:{{{stat3_label}}}| {{{stat3|}}} }}
 +
 
 +
| class36 = navbox-title
 +
| header36 = {{#if: {{{current_champion|{{{Current Champion|}}}}}}| Current champion }}
 +
 
 +
| data37 = {{{current_champion|{{{Current Champion|}}}}}}
 +
 
 +
| header38 = {{#if:{{{current|}}}|Most recent tournament}}
 +
| data39 = {{{current|}}}
 +
 
 +
| header40 = {{#if: {{{final_champion|{{{Final Champion|}}}}}}| Final champion }}
 +
 
 +
| data41 = {{{final_champion|{{{Final Champion|}}}}}}
 +
 
 +
| header42 = {{{event1|}}}
 +
 
 +
| label43 = Location
 +
|  data43= {{{event1_location|}}}
 +
 
 +
| label44 = Dates
 +
|  data44= {{{event1_dates|}}}
 +
 
 +
| label45 = Venue
 +
|  data45= {{{event1_venue|}}}
 +
 
 +
| label46 = Purse
 +
|  data46= {{{event1_purse|}}}
 +
 
 +
| label47 = Champion
 +
|  data47= {{{event1_champion|}}}
 +
 
 +
| label48 = Runner-up
 +
|  data48= {{{event1_runner-up|}}}
 +
 
 +
| label49 = Matches played
 +
|  data49= {{{event1_matches|}}}
 +
 
 +
| label50 = {{#if:{{{mvp_label|}}}|{{{mvp_label}}}|[[Most valuable player|MVP]]}}
 +
|  data50= {{{event1_mvp|}}}
 +
 
 +
|header51 = {{{event2|}}}
 +
 
 +
| label52 = Location
 +
|  data52= {{{event2_location|}}}
 +
 
 +
| label53 = Dates
 +
|  data53= {{{event2_dates|}}}
 +
 
 +
| label54 = Venue
 +
|  data54= {{{event2_venue|}}}
 +
 
 +
| label55 = Purse
 +
|  data55= {{{event2_purse|}}}
 +
 
 +
| label56 = Champion
 +
|  data56= {{{event2_champion|}}}
 +
 
 +
| label57 = Runner-up
 +
|  data57= {{{event2_runner-up|}}}
 +
 
 +
| label58 = Matches played
 +
|  data58= {{{event2_matches|}}}
 +
 
 +
| label59 = {{#if:{{{mvp_label|}}}|{{{mvp_label}}}|[[Most valuable player|MVP]]}}
 +
|  data59= {{{event2_mvp|}}}
 +
 
 +
|header60 = {{{event3|}}}
 +
 
 +
| label61 = Location
 +
|  data61= {{{event3_location|}}}
 +
 
 +
| label62 = Dates
 +
|  data62= {{{event3_dates|}}}
 +
 
 +
| label63 = Venue
 +
|  data63= {{{event3_venue|}}}
 +
 
 +
| label64 = Purse
 +
|  data64= {{{event3_purse|}}}
 +
 
 +
| label65 = Champion
 +
|  data65= {{{event3_champion|}}}
 +
 
 +
| label66 = Runner-up
 +
|  data66= {{{event3_runner-up|}}}
 +
 
 +
| label67 = Matches played
 +
|  data67= {{{event3_matches|}}}
 +
 
 +
| label68 = {{#if:{{{mvp_label|}}}|{{{mvp_label}}}|[[Most valuable player|MVP]]}}
 +
|  data68= {{{event3_mvp|}}}
 +
 
 +
|header69 = {{{event4|}}}
 +
 
 +
| label70 = Location
 +
|  data70= {{{event4_location|}}}
 +
 
 +
| label71 = Dates
 +
|  data71= {{{event4_dates|}}}
 +
 
 +
| label72 = Venue
 +
|  data72= {{{event4_venue|}}}
 +
 
 +
| label73 = Purse
 +
|  data73= {{{event4_purse|}}}
 +
 
 +
| label74 = Champion
 +
|  data74= {{{event4_champion|}}}
 +
 
 +
| label75 = Runner-up
 +
|  data75= {{{event4_runner-up|}}}
 +
 
 +
| label76 = Matches played
 +
|  data76= {{{event4_matches|}}}
 +
 
 +
| label77 = {{#if:{{{mvp_label|}}}|{{{mvp_label}}}|[[Most valuable player|MVP]]}}
 +
|  data77= {{{event4_mvp|}}}
 +
 
 +
| belowstyle = border-top:1px #aaa solid
 +
| below  = {{#if:{{{previous|}}}{{{next|}}}| {{succession links| left = {{{previous|}}}| right = {{{next|}}} }} }}
 +
 
 +
}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox tournament with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox tournament]] with unknown parameter "_VALUE_"|ignoreblank=y| 2nd place | 3rd place| administrator | administrators | alt | attendance | best_player | broadcast | caption | champion | champions | current | Current Champion | current_champion | date | defunct | end_date | established | establishment | events | event1 | event2 | event3 | event4 | event1_champion | event2_champion | event3_champion | event4_champion | event1_dates | event2_dates | event3_dates | event4_dates | event1_location | event2_location | event3_location | event4_location | event1_matches | event2_matches | event3_matches | event4_matches | event1_mvp | event2_mvp | event3_mvp | event4_mvp | event1_purse | event2_purse | event3_purse | event4_purse | event1_runner-up | event2_runner-up | event3_runner-up | event4_runner-up | event1_venue | event2_venue | event3_venue | event4_venue | Final Champion | final year | final_champion | final_year | format | game | goals | host | image | image_size | location | matches | month played | month_played | mvp | mvp_label | name | next | noaverage | number | participants | points | previous | purse | runner-up1 | runner-up2 | runners-up1 | runners-up2 | sport | start_date | stat1 | stat1_label | stat2 | stat2_label | stat3 | stat3_label | teams | top_scorer | top_try_scorer | tournament format | tournament_format | tournament_name | tries | venue | venues | website | year }}<noinclude>
 +
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 02:49, 20 February 2020

Script error: No such module "If empty".
Runner-upScript error: No such module "If empty".
2nd runners-upScript error: No such module "If empty".

[[Category:Infobox templates|Template:Remove first word]]

Template documentation[view] [edit] [history] [purge]

Usage

Template:Parameter names example

Sport tournament series

{{Infobox tournament
| name =
| image =
| caption = 
| sport =
| location =
| start_date = <!-- or | date = or | month_played = -->
| end_date = <!-- or | month_played = -->
| established =
| defunct = 
| teams = 
| number = Number of tournaments
| commissioner =
| format =
| current_champion = <!--Use if still played-->
| final_champion = <!--Use if no longer played-->
}}

Single sport tournament

{{Infobox tournament
| name =
| sport =
| year =
| image =
| caption = 
| location =
| start_date = <!-- or | date = -->
| end_date =
| established = 
| administrator =
| tournament_format =
| host =
| venues =
| participants = <!-- or | teams = -->
| purse =
| champions = <!-- or | champion = -->
| runners-up1 = <!-- or | runner-up1 = -->
| runners-up2 = <!-- or | runner-up2 = -->
| matches =
| points =
| tries = 
| goals = 
| attendance = 
| noaverage = <!-- Set to 1 to exclude average attendance per match -->
| mvp = 
| top_scorer = 
| top_try_scorer = 
| stat1_label =
| stat1 =
| stat2_label =
| stat2 =
| stat3_label =
| stat3 =
| previous = 
| next = 
}}

Tracking category

See also