Template:Player: Difference between revisions
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 | ||
|Name=String (mandatory) | |||
|Nickname=String | |||
|Hometown=String | |||
|HeightFeet=Integer | |||
|HeightInches=Integer | |||
|ActiveFromYear=Integer | |||
|ActiveToYear=Integer | |||
|Photo=File | |||
|Social=List (,) of URL | |||
}} | }} | ||
</noinclude> | <templatedata>{ | ||
<includeonly> | "description": "Player infobox (stores to Cargo).", | ||
{{#cargo_store: | "params": { | ||
"Name": {"label":"Name","type":"string","required":true,"suggested":true}, | |||
"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}}}}} | |||
|Nickname={{{Nickname|}}} | |||
| | |Hometown={{{Hometown|}}} | ||
|HeightFeet={{{HeightFeet|}}} | |||
| {{{ | |HeightInches={{{HeightInches|}}} | ||
| | |ActiveFromYear={{{ActiveFromYear|}}} | ||
|ActiveToYear={{{ActiveToYear|}}} | |||
| {{{ | |Photo={{{Photo|}}} | ||
| | |Team={{{Team|}}} | ||
|PlayerID={{{PlayerID|}}} | |||
| {{{ | |Social={{{Social|}}} | ||
| | }}<!-- --><table class="infobox infobox-player"> | ||
<tr><th class="infobox-title" colspan="2">{{{Name|{{PAGENAME}}}}}{{#if:{{{Nickname|}}}| · "{{{Nickname}}}"}}</th></tr> | |||
| {{{ | {{#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> | |||