Jump to content

Template:Team: Difference between revisions

From Spike Wiki
Created page with "<noinclude> {{#cargo_declare: _table=Teams |Name=String |Player1=Page |Player2=Page |Country=String |ActiveYears=String |Notes=Text }} </noinclude> <includeonly> {{#cargo_store: _table=Teams |Name={{{Name|}}} |Player1={{{Player1|}}} |Player2={{{Player2|}}} |Country={{{Country|}}} |ActiveYears={{{ActiveYears|}}} |Notes={{{Notes|}}} }} {| class="wikitable" ! colspan="2" style="text-align:center;" | {{PAGENAME}} |- ! Country | {{{Country|}}} |- ! Players | [..."
 
Restore encyclopedia team infobox styling
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{#cargo_declare:
{{#cargo_declare:_table=Teams
  _table=Teams
|Name=String
|Name=String
|PlayerA=String
|Player1=Page
|PlayerB=String
|Player2=Page
|TournamentCount=Integer
|Country=String
|ActiveFromYear=Number
|ActiveYears=String
|ActiveToYear=Number
|Notes=Text
|Logo=File
}}
}}
</noinclude>
<templatedata>{
<includeonly>
"description": "Team infobox (stores to Cargo).",
{{#cargo_store:
"params": {
  _table=Teams
  "Name": {"label":"Name","type":"string"},
|Name={{{Name|}}}
  "PlayerA": {"label":"Player A (player page name)","type":"string","required":true,"description":"Enter the exact Player page name (no brackets). Example: 'Jane Doe' or 'Player:Jane Doe' depending on your naming convention."},
|Player1={{{Player1|}}}
  "PlayerB": {"label":"Player B (player page name)","type":"string","required":true,"description":"Enter the exact Player page name (no brackets)."},
|Player2={{{Player2|}}}
  "TournamentCount": {"label":"Tournaments played","type":"number"},
|Country={{{Country|}}}
  "ActiveFromYear": {"label":"Active from (year)","type":"number"},
|ActiveYears={{{ActiveYears|}}}
  "ActiveToYear": {"label":"Active to (year)","type":"number"},
|Notes={{{Notes|}}}
  "Logo": {"label":"Logo file","type":"wiki-file-name"}
}}
}
{| class="wikitable"
}
! colspan="2" style="text-align:center;" | {{PAGENAME}}
</templatedata>
|-
</noinclude><includeonly>{{#default_form:Team}}<templatestyles src="Template:Infobox/styles.css" /><templatestyles src="Template:Team/styles.css" /><!-- -->{{#cargo_store:_table=Teams
! Country
|Name={{{Name|}}}
| {{{Country|}}}
|PlayerA={{{PlayerA|}}}
|-
|PlayerB={{{PlayerB|}}}
! Players
|TournamentCount={{{TournamentCount|}}}
| [[{{{Player1|}}}]] [[{{{Player2|}}}]]
|ActiveFromYear={{{ActiveFromYear|}}}
|-
|ActiveToYear={{{ActiveToYear|}}}
! Active years
|Logo={{{Logo|}}}
| {{{ActiveYears|}}}
}}<!-- --><table class="infobox infobox-team">
|-
<tr><th class="infobox-title" colspan="2">{{#if:{{{Name|}}}|{{{Name}}}|{{{PlayerA}}} &amp; {{{PlayerB}}}}}</th></tr>
! Notes
{{#if:{{{Logo|}}}|<tr><td class="infobox-image" colspan="2">[[File:{{{Logo}}}|frameless|250px]]</td></tr>}}
| {{{Notes|}}}
<tr><th>Players</th><td>[[{{{PlayerA}}}]] · [[{{{PlayerB}}}]]</td></tr>
|}
{{#if:{{{TournamentCount|}}}|<tr><th>Tournaments</th><td>{{{TournamentCount}}}</td></tr>}}
[[Category:Teams]]
{{#if:{{{ActiveFromYear|}}}|<tr><th>Active</th><td>{{{ActiveFromYear}}}{{#if:{{{ActiveToYear|}}}|–{{{ActiveToYear}}}|–present}}</td></tr>}}
</includeonly>
</table>[[Category:Teams]]</includeonly>

Revision as of 21:33, 16 April 2026

This template defines the table "Teams". View table.

Team infobox (stores to Cargo).

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
NameName

no description

Stringoptional
Player A (player page name)PlayerA

Enter the exact Player page name (no brackets). Example: 'Jane Doe' or 'Player:Jane Doe' depending on your naming convention.

Stringrequired
Player B (player page name)PlayerB

Enter the exact Player page name (no brackets).

Stringrequired
Tournaments playedTournamentCount

no description

Numberoptional
Active from (year)ActiveFromYear

no description

Numberoptional
Active to (year)ActiveToYear

no description

Numberoptional
Logo fileLogo

no description

Fileoptional