Jump to content

Template:Player: Difference between revisions

From Spike Wiki
Created page with "<noinclude> {{#cargo_declare: _table=Players |Name=String |Country=String |Handedness=String |ActiveYears=String |PrimaryTeam=String |NotableResults=Text |BirthDate=Date }} </noinclude> <includeonly> {{#cargo_store: _table=Players |Name={{{Name|}}} |Country={{{Country|}}} |Handedness={{{Handedness|}}} |ActiveYears={{{ActiveYears|}}} |PrimaryTeam={{{PrimaryTeam|}}} |NotableResults={{{NotableResults|}}} |BirthDate={{{BirthDate|}}} }} <!-- Simple infobox d..."
 
Remove player ID from visible infobox
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{#cargo_declare:
{{#cargo_declare:_table=Players
  _table=Players
|Name=String (mandatory)
|Name=String
|Nickname=String
|Country=String
|Hometown=String
|Handedness=String
|HeightFeet=Integer
|ActiveYears=String
|HeightInches=Integer
|PrimaryTeam=String
|ActiveFromYear=Integer
|NotableResults=Text
|ActiveToYear=Integer
|BirthDate=Date
|Photo=File
|Social=List (,) of URL
}}
}}
</noinclude>
<templatedata>{
<includeonly>
"description": "Player infobox (stores to Cargo).",
{{#cargo_store:
"params": {
  _table=Players
  "Name": {"label":"Name","type":"string","required":true,"suggested":true},
|Name={{{Name|}}}
  "Nickname": {"label":"Nickname","type":"string"},
|Country={{{Country|}}}
  "Hometown": {"label":"Hometown","type":"string"},
|Handedness={{{Handedness|}}}
  "HeightFeet": {"label":"Height (feet)","type":"number"},
|ActiveYears={{{ActiveYears|}}}
  "HeightInches": {"label":"Height (inches)","type":"number"},
|PrimaryTeam={{{PrimaryTeam|}}}
  "ActiveFromYear": {"label":"Active from (year)","type":"number"},
|NotableResults={{{NotableResults|}}}
  "ActiveToYear": {"label":"Active to (year)","type":"number"},
|BirthDate={{{BirthDate|}}}
  "Photo": {"label":"Photo file","type":"wiki-file-name"},
}}
  "Social": {"label":"Social (comma-separated URLs)","type":"string","description":"Comma-separated list of profile URLs"}
<!-- Simple infobox display -->
}
{| class="wikitable"
}
! colspan="2" style="text-align:center;" | {{PAGENAME}}
</templatedata>
|-
</noinclude><includeonly>{{#default_form:Player}}<templatestyles src="Template:Infobox/styles.css" /><templatestyles src="Template:Player/styles.css" /><!-- -->{{#cargo_store:_table=Players
! Country
|Name={{{Name|{{PAGENAME}}}}}
| {{{Country|}}}
|Nickname={{{Nickname|}}}
|-
|Hometown={{{Hometown|}}}
! Handedness
|HeightFeet={{{HeightFeet|}}}
| {{{Handedness|}}}
|HeightInches={{{HeightInches|}}}
|-
|ActiveFromYear={{{ActiveFromYear|}}}
! Active years
|ActiveToYear={{{ActiveToYear|}}}
| {{{ActiveYears|}}}
|Photo={{{Photo|}}}
|-
|Team={{{Team|}}}
! Primary team
|PlayerID={{{PlayerID|}}}
| {{{PrimaryTeam|}}}
|Social={{{Social|}}}
|-
}}<!-- --><table class="infobox infobox-player">
! Notable results
<tr><th class="infobox-title" colspan="2">{{{Name|{{PAGENAME}}}}}{{#if:{{{Nickname|}}}| · "{{{Nickname}}}"}}</th></tr>
| {{{NotableResults|}}}
{{#if:{{{Photo|}}}|<tr><td class="infobox-image" colspan="2">[[File:{{{Photo}}}|frameless|250px]]</td></tr>}}
|}
{{#if:{{{Hometown|}}}|<tr><th>Hometown</th><td>{{{Hometown}}}</td></tr>}}
[[Category:Players]]
{{#if:{{{Team|}}}|<tr><th>Team</th><td>[[{{{Team}}}]]</td></tr>}}
</includeonly>
{{#if:{{{HeightFeet|}}}{{{HeightInches|}}}|<tr><th>Height</th><td>{{{HeightFeet}}}′{{#if:{{{HeightInches|}}}|{{{HeightInches}}}″|}}</td></tr>}}
{{#if:{{{ActiveFromYear|}}}|<tr><th>Active</th><td>{{{ActiveFromYear}}}{{#if:{{{ActiveToYear|}}}|{{{ActiveToYear}}}|–present}}</td></tr>}}
{{#if:{{{Social|}}}|<tr><th>Social</th><td>{{#arraymap:{{{Social}}}|,|@@|{{#if:@@|<div class="player-social">[@@ @@]</div>}}}}</td></tr>}}
</table>[[Category:Players]]</includeonly>

Latest revision as of 01:43, 17 April 2026

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

Player infobox (stores to Cargo).

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
NameName

no description

Stringrequired
NicknameNickname

no description

Stringoptional
HometownHometown

no description

Stringoptional
Height (feet)HeightFeet

no description

Numberoptional
Height (inches)HeightInches

no description

Numberoptional
Active from (year)ActiveFromYear

no description

Numberoptional
Active to (year)ActiveToYear

no description

Numberoptional
Photo filePhoto

no description

Fileoptional
Social (comma-separated URLs)Social

Comma-separated list of profile URLs

Stringoptional