Template:Sports roster/entry/sandbox
This is the template sandbox page for Template:Sports roster/entry (diff). |
This template uses Lua: |
{{sports roster}} and {{sports roster/entry}} are used to generate detailed roster tables and roster navbox footers depending on the value of |format=
. By having a single template generate both formats, the lists of players and coaches in both templates stay in sync, and editors do not need to update the roster in multiple places.
Usage
[edit]The main template, {{sports roster}} generates a table or navbox with the roster. The entry template, {{sports roster/entry}}, is used to generate the rows in the table, or names in the list. The syntax used by {{sports roster/entry}} is the same, or similar to, the NBA and WNBA player templates ({{player2}} and {{playerW}}.
Parameter | Remarks |
---|---|
template_name |
The name of the template containing the roster, usually the same as {{subst:PAGENAME}}
|
format |
Either roster or navbox
|
style |
The name of a style submodule. Currently only WNBA and default are supported.
|
players |
A list of players formatted using the {{Sports roster/entry}} template. |
head_coach |
The name of the head coach formatted using the {{Sports roster/entry}} template. |
asst_coach |
The names of the assistant coaches formatted using the {{Sports roster/entry}} template. |
player_development |
The name of the player development coach formatted using the {{Sports roster/entry}} template. |
ath_train |
The name of the athletic trainer formatted using the {{Sports roster/entry}} template. |
assistant_trainer |
The name of the assistant trainer formatted using the {{Sports roster/entry}} template. |
str_cond |
The name of the strength and conditioning coach formatted using the {{Sports roster/entry}} template. |
Additional WNBA style parameters | |
team |
The full name of the WNBA team |
rosterteam |
Not necessary (the name of the used in the roster url at the WNBA website) |
otherlegend |
An entry appearing after the default legend entries |
otherlegend2 |
An entry appearing after the default legend entries |
otherlegend3 |
An entry appearing after the default legend entries |
notes |
Notes appearing after the legend |
Additional default style parameters | |
legend |
Text to appear in the legend after the coaches |
notes |
Notes appearing after the legend |
above |
Table title text shown when |format=roster
|
abovestyle |
CSS styling for the above table cell |
headingstyle |
CSS styling for the heading table cells when |format=roster
|
footer |
Table footer text shown when |format=roster
|
title |
Navbox title text shown when |format=navbox
|
titlestyle |
CSS styling for the navbox title |
below |
Navbox footer text shown when |format=navbox
|
belowstyle |
CSS styling for the navbox below |
Parameter | Remarks |
---|---|
Player or coach name and school parameters | |
first last |
The first and last name of the player or coach (typically the only name parameters needed) |
dab |
Disambiguation for linking the name (e.g., basketball or born in 1970) |
name |
For Chinese names where first and last do not provide the desired result
|
link |
For more complicated article linking, the title of the article about the player or coach |
alt |
For more complicated cases where the rendered name is not as desired |
nolink=1 |
To disable linking entirely |
school or college |
The school or college last attended by the player or coach (uses {{college}} for linking). For coaches with degrees from more than one college, use the institution where the (first) bachelor's degree was earned. |
from |
Where the player or coach transferred from if school or college is not typically (e.g., international players) |
Player parameters | |
num |
The player's uniform number (do not use for coaches) |
pos |
The player's position (do not use for coaches) |
ft in lbs |
The player's height and weight in feet, inches, and pounds (do not use for coaches) |
DOB |
The player's date of birth in YYYY-MM-DD format |
inj |
Set to y if the player is injured
|
note |
Note to put after the player's name (e.g., C for captain). |
WNBA usage
[edit]The standard usage for a WNBA roster starts by creating a main roster template, which will contain the list of players, coaches, and trainers. To demonstrate the usage, here is the source code for Template:Washington Mystics roster as of May 19, 2020.
{{sports roster
| template_name = Washington Mystics roster
| style = WNBA
| format = {{{1|}}}
| state = {{{state|}}}
| team = Washington Mystics
| players =
<!-- list of players -->
{{sports roster/entry | num = | first = Jaylyn | last = Agnew | pos = | ft = 5 | in = 11 | lbs = | DOB = 1997-07-21 | yrs = R | college =Creighton | nat = USA}}
{{sports roster/entry | num = 7 | first = Ariel | last = Atkins | pos = G | ft = 5 | in = 11 | lbs = 167 | DOB = 1996-07-30 | yrs = 2 | college = Texas | nat = USA}}
{{sports roster/entry | num = 31 | first = Tina | last = Charles | dab = basketball | pos = C | ft = 6 | in = 4 | lbs = 192 | DOB = 1988-12-05 | yrs = 10 | college = Connecticut | nat = USA}}
{{sports roster/entry | num = 9 | first = Natasha | last = Cloud | pos = G | ft = 5 | in = 9 | lbs = 160 | DOB= 1992-02-22 | yrs= 5 | college = Saint Joseph's | nat = USA}}
{{sports roster/entry | num = 11 | first = Elena | last = Delle Donne | pos = G/F | ft = 6 | in = 5 | lbs = 187 | DOB = 1989-09-05 | yrs = 7 | college = Delaware | nat = USA}}
{{sports roster/entry | num = 21 | first = Tianna | last = Hawkins| pos = F | ft = 6 | in = 3 | lbs = 186 | DOB = 1991-03-02 | yrs = 6 | college = Maryland | nat = USA}}
{{sports roster/entry | num = 2 | first = Myisha | last = Hines-Allen | pos = F | ft = 6 | in = 1 | lbs = 200 | DOB = 1996-05-30 | yrs = 2 | college = Louisville | nat = USA}}
{{sports roster/entry | num = 5 | first = Kiara | last = Leslie | pos = G | ft = 6 | in = 0 | lbs = 175 | DOB = 1995-12-06 | yrs = R | college = NC State | nat = USA}}
{{sports roster/entry | num = 33 | first = Emma | last = Meesseman | pos = F | ft = 6 | in = 4 | lbs = 191 | DOB = 1993-05-13 | yrs = 6 | from = Belgium | nat = BEL}}
{{sports roster/entry | num = 5 | first = Leilani | last = Mitchell | pos = G | ft = 5 | in = 5 | lbs = 138 | DOB = 1985-06-15 | yrs = 11 | from = Utah | nat = USA}}
{{sports roster/entry | num = 23 | first = Aerial | last = Powers | pos = F/G | ft = 5 | in = 9 | lbs = 159 | DOB = 1994-07-17 | yrs = 4 | college = Michigan State | nat = USA}}
{{sports roster/entry | num = 30 | first = LaToya | last = Sanders | pos = F/C | ft = 6 | in = 2 | lbs = 170 | DOB = 1986-09-11 | yrs = 7 | college = North Carolina | nat = USA}}
{{sports roster/entry | num = | first = Sug | last = Sutton | pos = G | ft = 5 | in = 8 | lbs = 130 | DOB = 1998-12-17 | yrs = R | college = Texas | nat = USA}}
<!-- end list of players -->
| head_coach =
{{sports roster/entry|nat=USA| first =Mike|last=Thibault|college=[[St. Martin's University|St. Martin's]]}}
| asst_coach =
{{sports roster/entry|nat=USA| first =Eric|last=Thibault|nolink=1|college=Missouri}}
{{sports roster/entry|nat=USA| first =Ashja|last=Jones|nolink=1|college=Connecticut}}
| ath_train =
{{sports roster/entry|nat=USA| first =Chalisa|last=Fonza|nolink=1|college=Western Illinois}}
| str_cond =
{{sports roster/entry|last=''Vacant''|nolink=1}}
}}
Since the value for |format=
is not specified, it shows the default detailed table view of the roster. Now, the source code for Template:Washington Mystics roster is very simple, since it just transcludes Template:Washington Mystics roster with a different value for |format=
{{Indiana Fever roster|footer|state={{{state|autocollapse}}}}}
Default usage
[edit]The standard usage is to start by creating a main roster template, which will contain the list of players, coaches, and trainers.
{{sports roster
| template_name = {{subst:PAGENAME}}
| style = default<!-- or another supported style -->
| format = {{{format|}}}
| state = {{{state|}}}
<!-- Table format styling -->
| above = <!-- Title to show in table format -->
| abovestyle = <!-- CSS styling for above -->
| headingstyle = <!-- CSS styling for the headings in table format -->
| footer = <!-- Text to show at the foot of the table in table format -->
<!-- Footer format styling -->
| title = <!-- Title to show in footer format -->
| titlestyle = <!-- CSS styling for title -->
| below = <!-- Text to show at the bottom of the navbox in footer format -->
| belowstyle = <!-- CSS styling for below -->
| players =
<!-- list of players -->
{{sports roster/entry | num = 1 | first = First1 | last = Last1 | pos = F | ft = 6 | in = 3 | lbs = 190 | DOB = YYYY-MM-DD | yrs = 2 | college = College1 | nat = Country1 }}
{{sports roster/entry | num = 2 | first = First2 | last = Last2 | link = Link2 | pos = G | ft = 5 | in = 7 | lbs = 143 | DOB = YYYY-MM-DD | yrs = 2 | college = College2 | nat = Country2}}
{{sports roster/entry | num = 3 | first = First3 | last = Last3 | nolink=1 | pos = C | ft = 6 | in = 11 | lbs = 220 | DOB = YYYY-MM-DD | yrs = 3 | college = College3 | nat = Country3 }}
<!-- ... -->
<!-- end list of players -->
| head_coach =
{{sports roster/entry|nat=USA|first=Firstname|last=Lastname|college=Collegename}}
| asst_coach =
{{sports roster/entry|nat=USA|first=Firstname|last=Lastname|nolink=1|college=Collegename}}
| ath_train =
{{sports roster/entry|nat=USA|first=Firstname|last=Lastname|nolink=1|college=[[Collegename]]}}
| str_cond =
{{sports roster/entry|nat=USA|first=Firstname|last=Lastname|nolink=1|college=}}
}}
See also
[edit]- {{NBA roster header}}
- {{NBA roster footer}}
- {{Player2}}
- {{Basketball roster header}}, {{Basketball roster footer}}, and {{Player3}}
- {{Basketball roster start}}, {{Basketball roster mid}}, {{Basketball roster end}}, and {{Basketball roster player}}