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..."
 
>Kypho
No edit summary
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
|ActiveFrom=Date
|NotableResults=Text
|ActiveTo=Date
|BirthDate=Date
|Photo=File
|Social=List (,) of URL
}}
}}
</noinclude>
</noinclude><includeonly>
<includeonly>
{{#default_form:Player}} <!-- show “Edit with form” tab on every Player page -->  
{{#cargo_store:
<templatestyles src="Template:Infobox/styles.css" />
  _table=Players
 
|Name={{{Name|}}}
<!-- store -->
|Country={{{Country|}}}
{{#cargo_store:_table=Players
|Handedness={{{Handedness|}}}
|Name={{{Name|{{PAGENAME}}}}}
|ActiveYears={{{ActiveYears|}}}
|Nickname={{{Nickname|}}}
|PrimaryTeam={{{PrimaryTeam|}}}
|Hometown={{{Hometown|}}}
|NotableResults={{{NotableResults|}}}
|HeightFeet={{{HeightFeet|}}}
|BirthDate={{{BirthDate|}}}
|HeightInches={{{HeightInches|}}}
|ActiveFrom={{{ActiveFrom|}}}
|ActiveTo={{{ActiveTo|}}}
|Photo={{{Photo|}}}
|Social={{{Social|}}}
}}
}}
<!-- Simple infobox display -->
 
{| class="wikitable"
<!-- render -->
! colspan="2" style="text-align:center;" | {{PAGENAME}}
<div class="infobox">
|-
  <div class="ib-title">{{{Name|{{PAGENAME}}}}}{{#if:{{{Nickname|}}}| · “{{{Nickname}}}”}}</div>
! Country
  <div class="ib-img">{{#if:{{{Photo|}}}|[[File:{{{Photo}}}|340px]]}}</div>
| {{{Country|}}}
  {{#if:{{{Hometown|}}}|<div class="ib-row"><span class="ib-label">Hometown</span><span>{{{Hometown}}}</span></div>}}
|-
  {{#if:{{{HeightFeet|}}}{{{HeightInches|}}}|<div class="ib-row"><span class="ib-label">Height</span><span>{{{HeightFeet}}}′{{{HeightInches|0}}}″</span></div>}}
! Handedness
  {{#if:{{{ActiveFrom|}}}|<div class="ib-row"><span class="ib-label">Active</span><span>{{{ActiveFrom}}}{{#if:{{{ActiveTo|}}}|{{{ActiveTo}}}|–present}}</span></div>}}
| {{{Handedness|}}}
</div>
|-
 
! Active years
| {{{ActiveYears|}}}
|-
! Primary team
| {{{PrimaryTeam|}}}
|-
! Notable results
| {{{NotableResults|}}}
|}
[[Category:Players]]
[[Category:Players]]
</includeonly>
</includeonly>

Revision as of 22:32, 14 September 2025

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