Difference between revisions of "Template:IBSF/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (fix placement of category to include template, not documentation (via JWB))
imported>Zyxw
(update TemplateData and add "paramOrder")
Line 27: Line 27:
  
 
== TemplateData ==
 
== TemplateData ==
{{TemplateDataHeader}}
+
{{TemplateData header}}
 
<templatedata>
 
<templatedata>
 
{
 
{
Line 33: Line 33:
 
   "params": {
 
   "params": {
 
     "id": {
 
     "id": {
       "label": "ID",
+
       "label": "id",
 
       "aliases": ["1"],  
 
       "aliases": ["1"],  
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion the URL. Example: 100527 is the ID portion of http://www.ibsf.org/en/athletes/athlete/100527.  This parameter is optional if Wikidata property P2991 exists, but required if not.",
+
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 100527 is the ID portion of http://www.ibsf.org/en/athletes/athlete/100527.  This parameter is optional if Wikidata property P2991 exists, but required if not.",
 
       "type": "number",
 
       "type": "number",
 
       "default": "Wikidata property P2991",
 
       "default": "Wikidata property P2991",
       "required": true
+
       "required": false
 
     },
 
     },
 
     "name": {
 
     "name": {
       "label": "Name",
+
       "label": "name",
 
       "aliases": ["2"],  
 
       "aliases": ["2"],  
 
       "description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the athlete. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(bobsleigh)\" or \"(skeleton racer)\".",
 
       "description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the athlete. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(bobsleigh)\" or \"(skeleton racer)\".",
Line 48: Line 48:
 
       "required": false
 
       "required": false
 
     }
 
     }
   }
+
   },
}</templatedata>
+
  "paramOrder": [
 +
    "id",
 +
    "name"
 +
  ]
 +
}
 +
</templatedata>
  
 
== Examples ==
 
== Examples ==

Revision as of 10:58, 7 March 2017

Template:Uses Wikidata Template:Tracks Wikidata

Template:IBSF displays an external link to an athlete's profile at the website of the International Bobsleigh & Skeleton Federation (IBSF), the international governing body for the sports of bobsleigh and skeleton, formerly known as Fédération Internationale de Bobsleigh et de Tobogganing (FIBT). It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

{{IBSF | ID }}
{{IBSF | ID | NAME }}

Named parameters:

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

Using Wikidata property P2991:

{{IBSF}}
{{IBSF | name= NAME }}

Note: Usage of the third unnamed parameter or the "sport" parameter is no longer required. This was used for the former URL format:

http://www.ibsf.org/bobsleigh/athletes.html?athl_id={{{id}}}
http://www.ibsf.org/skeleton/athletes.html?athl_id={{{id}}}
http://www.fibt.com/bobsleigh/athletes.html?athl_id={{{id}}}
http://www.fibt.com/skeleton/athletes.html?athl_id={{{id}}}

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for IBSF

This template displays an external link to an athlete's profile at the website of the International Bobsleigh & Skeleton Federation (IBSF), the international governing body for the sports of bobsleigh and skeleton, formerly known as Fédération Internationale de Bobsleigh et de Tobogganing (FIBT). It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
idid 1

The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: 100527 is the ID portion of http://www.ibsf.org/en/athletes/athlete/100527. This parameter is optional if Wikidata property P2991 exists, but required if not.

Default
Wikidata property P2991
Numberoptional
namename 2

The "name" parameter (or unnamed parameter "2") may be used to specify the link text, which should be the name of the athlete. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(bobsleigh)" or "(skeleton racer)".

Default
{{PAGENAMEBASE}}
Stringoptional

Examples

Unnamed parameters

Usage:

{{IBSF | 100527 | Steve Mesler }}

Output:

Steve Mesler at the International Bobsleigh & Skeleton FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck

URL:

http://www.ibsf.org/en/athletes/athlete/100527

Former URLs:

http://www.ibsf.org/bobsleigh/athletes.html?athl_id=100527
http://www.fibt.com/bobsleigh/athletes.html?athl_id=100527

Named parameters

Usage:

{{IBSF |id= 100694 |name= Katie Uhlaender }}

Output:

Katie Uhlaender at the International Bobsleigh & Skeleton FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck

URL:

http://www.ibsf.org/en/athletes/athlete/100694

Former URLs:

http://www.ibsf.org/skeleton/athletes.html?athl_id=100694
http://www.fibt.com/skeleton/athletes.html?athl_id=100694

No parameters and Wikidata property not defined

Usage:

{{IBSF}}

Output:

Template:PAGENAMEBASE at the International Bobsleigh & Skeleton FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck

Tracking categories

"id" parameter exists
"id" parameter does not exist
"sport" or "3" parameter exists