Difference between revisions of "Template:Brisplayer/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(create documentation)
 
imported>Zyxw
m (Since <tt> is obsolete in HTML5, replace it with <kbd> – see HTML element#tt, Wikipedia:HTML5, and mw:Help:Extension:Linter/obsolete-tag. using AWB)
Line 25: Line 25:
 
; id
 
; id
 
; link
 
; link
: Any of these parameters may be used specify the portion of the [[URL]] specific to an individual player, such as <tt>allen-christensen</tt> in <tt>[http://www.lions.com.au/player-profile/allen-christensen http://www.lions.com.au/player-profile/{{hilite|allen-christensen}}]</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 [[Allen Christensen (footballer)]], the default value is <tt>allen-christensen</tt> (which is correct, therefore this parameter would be optional). If used in the article for [[Claye Beams]], the default value is <tt>claye-beams</tt> (which is not correct, so this parameter would be used with <tt>clayton-beams</tt>).
+
: Any of these parameters may be used specify the portion of the [[URL]] specific to an individual player, such as <kbd>allen-christensen</kbd> in <kbd>[http://www.lions.com.au/player-profile/allen-christensen http://www.lions.com.au/player-profile/{{hilite|allen-christensen}}]</kbd>. 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 [[Allen Christensen (footballer)]], the default value is <kbd>allen-christensen</kbd> (which is correct, therefore this parameter would be optional). If used in the article for [[Claye Beams]], the default value is <kbd>claye-beams</kbd> (which is not correct, so this parameter would be used with <kbd>clayton-beams</kbd>).
  
 
; 2 (second unnamed parameter)
 
; 2 (second unnamed parameter)
Line 36: Line 36:
 
=== Unnamed parameters ===
 
=== Unnamed parameters ===
 
URL:
 
URL:
: <tt>[http://www.lions.com.au/player-profile/allen-christensen http://www.lions.com.au/player-profile/{{hilite|allen-christensen}}]</tt>
+
: <kbd>[http://www.lions.com.au/player-profile/allen-christensen http://www.lions.com.au/player-profile/{{hilite|allen-christensen}}]</kbd>
 
Usage:
 
Usage:
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | allen-christensen | Allen Christensen }}</code>
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | allen-christensen | Allen Christensen }}</code>
Line 44: Line 44:
 
=== Named parameters: id, name ===
 
=== Named parameters: id, name ===
 
URL:
 
URL:
: <tt>[http://www.lions.com.au/player-profile/zac-obrien http://www.lions.com.au/player-profile/{{hilite|zac-obrien}}]</tt>
+
: <kbd>[http://www.lions.com.au/player-profile/zac-obrien http://www.lions.com.au/player-profile/{{hilite|zac-obrien}}]</kbd>
 
Usage:
 
Usage:
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= zac-obrien | name= Zac O'Brien }}</code>
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= zac-obrien | name= Zac O'Brien }}</code>
Line 52: Line 52:
 
=== Named parameters: link, alt ===
 
=== Named parameters: link, alt ===
 
URL:
 
URL:
: <tt>[http://www.lions.com.au/player-profile/clayton-beams http://www.lions.com.au/player-profile/{{hilite|clayton-beams}}]</tt>
+
: <kbd>[http://www.lions.com.au/player-profile/clayton-beams http://www.lions.com.au/player-profile/{{hilite|clayton-beams}}]</kbd>
 
Usage:
 
Usage:
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | link= clayton-beams | alt= Clayton Beams }}</code>
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | link= clayton-beams | alt= Clayton Beams }}</code>
Line 59: Line 59:
  
 
=== Using default values ===
 
=== Using default values ===
If used in the article for [[Allen Christensen (footballer)]], this template automatically generates the correct ID <tt>allen-christensen</tt> and the following links would work:
+
If used in the article for [[Allen Christensen (footballer)]], this template automatically generates the correct ID <kbd>allen-christensen</kbd> and the following links would work:
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
  
If used in the article for [[Claye Beams]], this template automatically generates an '''incorrect''' ID <tt>claye-beams</tt>. The correct ID <tt>clayton-beams</tt> must be specified:
+
If used in the article for [[Claye Beams]], this template automatically generates an '''incorrect''' ID <kbd>claye-beams</kbd>. The correct ID <kbd>clayton-beams</kbd> must be specified:
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | clayton-beams }}</code>
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | clayton-beams }}</code>
  

Revision as of 05:38, 5 August 2018

Template:Brisplayer displays an external link to an Australian rules football player's page at Lions.com.au, the official website of the Brisbane Lions in the Australian Football League (AFL). It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

{{Brisplayer | ID }}
{{Brisplayer | ID | NAME }}

Named parameters (id, name):

{{Brisplayer | id= ID }}
{{Brisplayer | id= ID | name= NAME }}

Named parameters (link, alt):

{{Brisplayer | link= ID }}
{{Brisplayer | link= ID | alt= NAME }}

No parameters (generates link based on Wikipedia article name, test first to ensure a working link):

{{Brisplayer}}

Parameters

1 (first unnamed parameter)
id
link
Any of these parameters may be used specify the portion of the URL specific to an individual player, such as allen-christensen in http://www.lions.com.au/player-profile/allen-christensen. 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 Allen Christensen (footballer), the default value is allen-christensen (which is correct, therefore this parameter would be optional). If used in the article for Claye Beams, the default value is claye-beams (which is not correct, so this parameter would be used with clayton-beams).
2 (second unnamed parameter)
name
alt
Any of these parameters 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 Allen Christensen (footballer), the default would be Allen Christensen. This parameter is always optional unless the anchor text should be different than the article name. For example, in the article Claye Beams the template might specify the name as Clayton Beams.

Examples

Unnamed parameters

URL:

http://www.lions.com.au/player-profile/allen-christensen

Usage:

* {{Brisplayer | allen-christensen | Allen Christensen }}

Result:

Named parameters: id, name

URL:

http://www.lions.com.au/player-profile/zac-obrien

Usage:

* {{Brisplayer | id= zac-obrien | name= Zac O'Brien }}

Result:

Named parameters: link, alt

URL:

http://www.lions.com.au/player-profile/clayton-beams

Usage:

* {{Brisplayer | link= clayton-beams | alt= Clayton Beams }}

Result:

Using default values

If used in the article for Allen Christensen (footballer), this template automatically generates the correct ID allen-christensen and the following links would work:

* {{Brisplayer}}

If used in the article for Claye Beams, this template automatically generates an incorrect ID claye-beams. The correct ID clayton-beams must be specified:

* {{Brisplayer | clayton-beams }}

See also

Other templates implemented using {{AFL player}}:

External links