Difference between revisions of "Template:AFL player/doc"
blackwiki>Zyxw (create documentation) |
blackwiki>Zyxw (updates) |
||
| Line 2: | Line 2: | ||
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata --> | <!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata --> | ||
| − | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[Australian rules football]] player's page at the website for a club in the [[Australian Football League]] (AFL). | + | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[Australian rules football]] player's page at the website for a club in the [[Australian Football League]] (AFL). This template is used to implement other templates for specific AFL teams such as [[Template:Adelplayer]] ([[Adelaide Football Club]]) and [[Template:Brisplayer]] ([[Brisbane Lions]]) which can be used in the external links sections of the player's Wikipedia article. |
== Usage == | == Usage == | ||
| + | With ''Club'' parameter only: | ||
: <code><nowiki>{{AFL player | Club= }}</nowiki></code> | : <code><nowiki>{{AFL player | Club= }}</nowiki></code> | ||
| + | |||
| + | With ''id'' and ''name'' parameters: | ||
| + | : <code><nowiki>{{AFL player | Club= | id= }}</nowiki></code> | ||
| + | : <code><nowiki>{{AFL player | Club= | name= }}</nowiki></code> | ||
| + | : <code><nowiki>{{AFL player | Club= | id= | name= }}</nowiki></code> | ||
| + | |||
| + | With ''link'' and ''alt'' parameters: | ||
: <code><nowiki>{{AFL player | Club= | link= }}</nowiki></code> | : <code><nowiki>{{AFL player | Club= | link= }}</nowiki></code> | ||
: <code><nowiki>{{AFL player | Club= | alt= }}</nowiki></code> | : <code><nowiki>{{AFL player | Club= | alt= }}</nowiki></code> | ||
| Line 12: | Line 20: | ||
== Parameters == | == Parameters == | ||
| − | === Club | + | === Required: ''Club'' parameter === |
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
! {{para|Club}} !! Name !! Website !! Template | ! {{para|Club}} !! Name !! Website !! Template | ||
| Line 53: | Line 61: | ||
|} | |} | ||
| − | === link | + | === Optional: ''id'' or ''link'' parameters === |
| − | This parameter may be used specify the portion of the [[URL]] specific to an individual player, such as <tt>tom-jonas</tt> in <tt>[http://www.portadelaidefc.com.au/player-profile/tom-jonas http://www.portadelaidefc.com.au/player-profile/{{hilite|tom-jonas}}]</tt>. It defaults to the Wikipedia article name, without any disambiguation such as "(footballer)", converted to lower case and with a hyphen added after the first word. If used in | + | This parameter may be used specify the portion of the [[URL]] specific to an individual player, such as <tt>tom-jonas</tt> in <tt>[http://www.portadelaidefc.com.au/player-profile/tom-jonas http://www.portadelaidefc.com.au/player-profile/{{hilite|tom-jonas}}]</tt>. It defaults to the Wikipedia article name, without any disambiguation such as "(footballer)", converted to lower case and with a hyphen added after the first word. If used in the article for [[Tom Jonas]], the default value is <tt>tom-jonas</tt> (which is correct, therefore this parameter would be optional). If used in the article for [[Cam Ellis-Yolmen]], the default value is <tt>cam-ellis-yolmen</tt> (which is not correct, so the template must be called with {{para|id|cameron-ellisyolmen}} or {{para|link|cameron-ellisyolmen}}). |
| − | === alt | + | === Optional: ''name'' or ''alt'' parameters === |
| − | This parameter may be used to specify the [[anchor text]] used for the external link, which should be the name of the player. It defaults to the Wikipedia article name, without any disambiguation such as "(footballer)". If used in an article named "Tom Jonas (footballer)", the default would be Tom Jonas | + | This parameter may be used to specify the [[anchor text]] used for the external link, which should be the name of the player. It defaults to the Wikipedia article name, without any disambiguation such as "(footballer)". If used in an article named "Tom Jonas (footballer)", the default would be Tom Jonas. This parameter is always optional unless the anchor text should be different than the article name. For example, in the article "Cam Ellis-Yolmen" the template could be called with {{para|name|Cameron Ellis-Yolmen}} or {{para|alt|Cameron Ellis-Yolmen}}. |
| − | == | + | == Examples == |
| + | |||
| + | === Using ''id'' and ''name'' parameters === | ||
URL: | URL: | ||
: <tt>[http://www.portadelaidefc.com.au/player-profile/tom-jonas http://www.portadelaidefc.com.au/player-profile/{{hilite|tom-jonas}}]</tt> | : <tt>[http://www.portadelaidefc.com.au/player-profile/tom-jonas http://www.portadelaidefc.com.au/player-profile/{{hilite|tom-jonas}}]</tt> | ||
| + | Possible usage: | ||
| + | : <code><nowiki>* {{AFL player | Club = POR | id= tom-jonas | name= Tom Jonas }}</nowiki></code> | ||
| + | * {{AFL player | Club = POR | id= tom-jonas | name= Tom Jonas }} | ||
| + | Suggested usage: | ||
| + | : <code><nowiki>* {{Portplayer | id= tom-jonas | name= Tom Jonas }}</nowiki></code> | ||
| + | * {{Portplayer | id= tom-jonas | name= Tom Jonas }} | ||
| + | |||
| + | === Using ''link'' and ''alt'' parameters === | ||
| + | URL: | ||
| + | : <tt>[http://www.afc.com.au/player-profile/cameron-ellisyolmen http://www.afc.com.au/player-profile/{{hilite|cameron-ellisyolmen}}]</tt> | ||
| + | Possible usage: | ||
| + | : <code><nowiki>* {{AFL player | Club = ADE | link= cameron-ellisyolmen | alt= Cameron Ellis-Yolmen }}</nowiki></code> | ||
| + | * {{AFL player | Club = ADE | link= cameron-ellisyolmen | alt= Cameron Ellis-Yolmen }} | ||
| + | Suggested usage: | ||
| + | : <code><nowiki>* {{Adelplayer | link= cameron-ellisyolmen | alt= Cameron Ellis-Yolmen }}</nowiki></code> | ||
| + | * {{Adelplayer | link= cameron-ellisyolmen | alt= Cameron Ellis-Yolmen }} | ||
| − | + | === Using default values === | |
| − | : <code><nowiki>{{AFL player | Club = POR | + | If used in the article for [[Tom Jonas]], this template automatically generates the correct ID <tt>tom-jonas</tt> and the following links would work: |
| − | : <code><nowiki>{{Portplayer | + | : Possible usage: |
| + | : <code><nowiki>* {{AFL player|Club=POR}}</nowiki></code> | ||
| + | : Suggested usage: | ||
| + | : <code><nowiki>* {{Portplayer}}</nowiki></code> | ||
| − | + | If used in the article for [[Cam Ellis-Yolmen]], this template automatically generates an '''incorrect''' ID <tt>cam-ellis-yolmen</tt>. The correct ID <tt>cameron-ellisyolmen</tt> must be specified via the "id" or "link" parameters: | |
| − | : {{AFL player | Club = | + | : Possible usage: |
| − | : {{ | + | : <code><nowiki>* {{AFL player|Club=ADE|id=cameron-ellisyolmen}}</nowiki></code> |
| + | : <code><nowiki>* {{AFL player|Club=ADE|link=cameron-ellisyolmen}}</nowiki></code> | ||
| + | : Suggested usage: | ||
| + | : <code><nowiki>* {{Adelplayer|id=cameron-ellisyolmen}}</nowiki></code> | ||
| + | : <code><nowiki>* {{Adelplayer|link=cameron-ellisyolmen}}</nowiki></code> | ||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
Revision as of 05:23, 18 April 2017
| File:Edit-copy green.svg | This is a documentation subpage for Template:AFL player. It contains usage information, categories and other content that is not part of the original template page. |
Template:AFL player displays an external link to an Australian rules football player's page at the website for a club in the Australian Football League (AFL). This template is used to implement other templates for specific AFL teams such as Template:Adelplayer (Adelaide Football Club) and Template:Brisplayer (Brisbane Lions) which can be used in the external links sections of the player's Wikipedia article.
Contents
Usage
With Club parameter only:
{{AFL player | Club= }}
With id and name parameters:
{{AFL player | Club= | id= }}{{AFL player | Club= | name= }}{{AFL player | Club= | id= | name= }}
With link and alt parameters:
{{AFL player | Club= | link= }}{{AFL player | Club= | alt= }}{{AFL player | Club= | link= | alt= }}
Parameters
Required: Club parameter
|Club= |
Name | Website | Template |
|---|---|---|---|
| ADE | Adelaide Football Club | www.afc.com.au | {{Adelplayer}} |
| BRI | Brisbane Lions | www.lions.com.au | {{Brisplayer}} |
| CAR | Carlton Football Club | www.carltonfc.com.au | {{Carlplayer}} |
| COL | Collingwood Football Club | www.collingwoodfc.com.au | {{Collplayer}} |
| ESS | Essendon Football Club | www.essendonfc.com.au | {{Essplayer}} |
| FRE | Fremantle Football Club | www.fremantlefc.com.au | {{Fremplayer}} |
| GC | Gold Coast Football Club | www.goldcoastfc.com.au | {{GCplayer}} |
| GEE | Geelong Football Club | www.geelongcats.com.au | {{Geelplayer}} |
| GWS | Greater Western Sydney Giants | www.gwsgiants.com.au | {{GWSplayer}} |
| HAW | Hawthorn Football Club | www.hawthornfc.com.au | {{Hawplayer}} |
| MEL | Melbourne Football Club | www.melbournefc.com.au | {{Melbplayer}} |
| NM | North Melbourne Football Club | www.nmfc.com.au | {{NMplayer}} |
| POR | Port Adelaide Football Club | www.portadelaidefc.com.au | {{Portplayer}} |
| RIC | Richmond Football Club | www.richmondfc.com.au | {{Richplayer}} |
| STK | St Kilda Football Club | www.saints.com.au | {{Stkplayer}} |
| SYD | Sydney Swans | www.sydneyswans.com.au | {{Sydplayer}} |
| WBD | Western Bulldogs | www.westernbulldogs.com.au | {{Wbplayer}} |
| WCE | West Coast Eagles | www.westcoasteagles.com.au | {{Wceplayer}} |
Optional: id or link parameters
This parameter may be used specify the portion of the URL specific to an individual player, such as tom-jonas in http://www.portadelaidefc.com.au/player-profile/tom-jonas. It defaults to the Wikipedia article name, without any disambiguation such as "(footballer)", converted to lower case and with a hyphen added after the first word. If used in the article for Tom Jonas, the default value is tom-jonas (which is correct, therefore this parameter would be optional). If used in the article for Cam Ellis-Yolmen, the default value is cam-ellis-yolmen (which is not correct, so the template must be called with |id=cameron-ellisyolmen or |link=cameron-ellisyolmen).
Optional: name or alt parameters
This parameter may be used to specify the anchor text used for the external link, which should be the name of the player. It defaults to the Wikipedia article name, without any disambiguation such as "(footballer)". If used in an article named "Tom Jonas (footballer)", the default would be Tom Jonas. This parameter is always optional unless the anchor text should be different than the article name. For example, in the article "Cam Ellis-Yolmen" the template could be called with |name=Cameron Ellis-Yolmen or |alt=Cameron Ellis-Yolmen.
Examples
Using id and name parameters
URL:
Possible usage:
* {{AFL player | Club = POR | id= tom-jonas | name= Tom Jonas }}
- Tom Jonas's profile on the official website of the Port Adelaide Football Club
Suggested usage:
* {{Portplayer | id= tom-jonas | name= Tom Jonas }}
Using link and alt parameters
URL:
Possible usage:
* {{AFL player | Club = ADE | link= cameron-ellisyolmen | alt= Cameron Ellis-Yolmen }}
- Template:PAGENAMEBASE Cameron Ellis-Yolmen's profile on the official website of the Adelaide Football Club
Suggested usage:
* {{Adelplayer | link= cameron-ellisyolmen | alt= Cameron Ellis-Yolmen }}
- Cameron Ellis-Yolmen's profile on the official website of the Adelaide Football Club
Using default values
If used in the article for Tom Jonas, this template automatically generates the correct ID tom-jonas and the following links would work:
- Possible usage:
* {{AFL player|Club=POR}}- Suggested usage:
* {{Portplayer}}
If used in the article for Cam Ellis-Yolmen, this template automatically generates an incorrect ID cam-ellis-yolmen. The correct ID cameron-ellisyolmen must be specified via the "id" or "link" parameters:
- Possible usage:
* {{AFL player|Club=ADE|id=cameron-ellisyolmen}}* {{AFL player|Club=ADE|link=cameron-ellisyolmen}}- Suggested usage:
* {{Adelplayer|id=cameron-ellisyolmen}}* {{Adelplayer|link=cameron-ellisyolmen}}