Jump to content

Template:Player: Difference between revisions

From Spike Wiki
>Kypho
No edit summary
Remove player ID from visible infobox
 
(15 intermediate revisions by 2 users not shown)
Line 11: Line 11:
|Social=List (,) of URL
|Social=List (,) of URL
}}
}}
</noinclude><includeonly>
<templatedata>{
{{#default_form:Player}}
"description": "Player infobox (stores to Cargo).",
<templatestyles src="Template:Infobox/styles.css" />
"params": {
 
  "Name": {"label":"Name","type":"string","required":true,"suggested":true},
{{#cargo_store:_table=Players
  "Nickname": {"label":"Nickname","type":"string"},
  "Hometown": {"label":"Hometown","type":"string"},
  "HeightFeet": {"label":"Height (feet)","type":"number"},
  "HeightInches": {"label":"Height (inches)","type":"number"},
  "ActiveFromYear": {"label":"Active from (year)","type":"number"},
  "ActiveToYear": {"label":"Active to (year)","type":"number"},
  "Photo": {"label":"Photo file","type":"wiki-file-name"},
  "Social": {"label":"Social (comma-separated URLs)","type":"string","description":"Comma-separated list of profile URLs"}
}
}
</templatedata>
</noinclude><includeonly>{{#default_form:Player}}<templatestyles src="Template:Infobox/styles.css" /><templatestyles src="Template:Player/styles.css" /><!-- -->{{#cargo_store:_table=Players
|Name={{{Name|{{PAGENAME}}}}}
|Name={{{Name|{{PAGENAME}}}}}
|Nickname={{{Nickname|}}}
|Nickname={{{Nickname|}}}
Line 24: Line 35:
|ActiveToYear={{{ActiveToYear|}}}
|ActiveToYear={{{ActiveToYear|}}}
|Photo={{{Photo|}}}
|Photo={{{Photo|}}}
|Team={{{Team|}}}
|PlayerID={{{PlayerID|}}}
|Social={{{Social|}}}
|Social={{{Social|}}}
}}
}}<!-- --><table class="infobox infobox-player">
 
<tr><th class="infobox-title" colspan="2">{{{Name|{{PAGENAME}}}}}{{#if:{{{Nickname|}}}| · "{{{Nickname}}}"}}</th></tr>
<div class="infobox">
{{#if:{{{Photo|}}}|<tr><td class="infobox-image" colspan="2">[[File:{{{Photo}}}|frameless|250px]]</td></tr>}}
  <div class="ib-title">{{{Name|{{PAGENAME}}}}}{{#if:{{{Nickname|}}}| · {{{Nickname}}}}}</div>
{{#if:{{{Hometown|}}}|<tr><th>Hometown</th><td>{{{Hometown}}}</td></tr>}}
  <div class="ib-img">{{#if:{{{Photo|}}}|[[File:{{{Photo}}}|340px]]}}</div>
{{#if:{{{Team|}}}|<tr><th>Team</th><td>[[{{{Team}}}]]</td></tr>}}
  {{#if:{{{Hometown|}}}|<div class="ib-row"><span class="ib-label">Hometown</span><span>{{{Hometown}}}</span></div>}}
{{#if:{{{HeightFeet|}}}{{{HeightInches|}}}|<tr><th>Height</th><td>{{{HeightFeet}}}′{{#if:{{{HeightInches|}}}|{{{HeightInches}}}″|}}</td></tr>}}
  {{#if:{{{HeightFeet|}}}{{{HeightInches|}}}|<div class="ib-row"><span class="ib-label">Height</span><span>{{{HeightFeet}}}′{{{HeightInches|0}}}″</span></div>}}
{{#if:{{{ActiveFromYear|}}}|<tr><th>Active</th><td>{{{ActiveFromYear}}}{{#if:{{{ActiveToYear|}}}|–{{{ActiveToYear}}}|–present}}</td></tr>}}
  {{#if:{{{ActiveFromYear|}}}|<div class="ib-row"><span class="ib-label">Active</span>
{{#if:{{{Social|}}}|<tr><th>Social</th><td>{{#arraymap:{{{Social}}}|,|@@|{{#if:@@|<div class="player-social">[@@ @@]</div>}}}}</td></tr>}}
    <span>{{{ActiveFromYear}}}{{#if:{{{ActiveToYear|}}}|–{{{ActiveToYear}}}|–present}}</span></div>}}
</table>[[Category:Players]]</includeonly>
</div>
 
[[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