Difference between revisions of "Template:FIG/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)
Line 25: Line 25:
  
 
== TemplateData ==
 
== TemplateData ==
{{TemplateDataHeader}}
+
{{TemplateData header}}
<templatedata>{
+
<templatedata>
"description": "This template displays an external link to an gymnast's profile at FIG-gymnastics.com, the official website of the International Federation of Gymnastics (FIG: Fédération Internationale de Gymnastique). It is intended for use in the external links section of an article.",
+
{
"params": {
+
  "description": "This template displays an external link to an gymnast's profile at FIG-gymnastics.com, the official website of the International Federation of Gymnastics (FIG: Fédération Internationale de Gymnastique). It is intended for use in the external links section of an article.",
  "id": {
+
  "params": {
    "label": "ID",
+
    "id": {
    "aliases": ["1"],  
+
      "label": "id",
    "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion the URL for the gymnast's page at FIG-gymnastics.com. Example: 13822 is the ID portion of https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl=. This parameter is optional if Wikidata property P2696 exists, but required if not.",
+
      "aliases": ["1"],  
    "type": "number",
+
      "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 13822 is the ID portion of https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl=. This parameter is optional if Wikidata property P2696 exists, but required if not.",
    "default": "Wikidata property P2696",
+
      "type": "number",
     "required": true
+
      "default": "Wikidata property P2696",
 +
      "required": false
 +
    },
 +
     "name": {
 +
      "label": "name",
 +
      "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 gymnast. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(gymnast)\".",
 +
      "type": "string",
 +
      "default": "{{PAGENAMEBASE}}",
 +
      "required": false
 +
    },
 +
    "brief": {
 +
      "label": "brief",
 +
      "description": "The \"brief\" parameter may be used to display the external link without the appended description. The value can be \"yes\", \"true\", or any text. This parameter is optional.",
 +
      "type": "string",
 +
      "required": false
 +
    }
 
   },
 
   },
   "name": {
+
   "paramOrder": [
     "label": "Name",
+
     "id",
     "aliases": ["2"],
+
     "name",
    "description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the gymnast. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(gymnast)\".",
+
     "brief"
     "type": "string",
+
   ]
    "default": "{{PAGENAMEBASE}}",
+
}
    "required": false
+
</templatedata>
   },
 
  "brief": {
 
    "label": "Brief",
 
    "description": "The \"brief\" parameter may be used to display the external link without the appended description. The value can be \"yes\", \"true\", or any text. This parameter is optional.",
 
    "type": "string",
 
    "required": false
 
  }
 
}}</templatedata>.
 
  
 
== Examples ==
 
== Examples ==
Line 92: Line 100:
 
* {{tl|USA Gymnastics name}}
 
* {{tl|USA Gymnastics name}}
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
+
<includeonly>{{sandbox other||
<!-- Categories go here, and interwikis go in Wikidata -->
+
<!-- Categories below this line; interwikis at Wikidata -->
 +
[[Category:Gymnastics external link templates]]
 +
[[Category:Sports governing body external link templates]]
 
[[Category:People and person external link templates]]
 
[[Category:People and person external link templates]]
[[Category:Sports governing body external link templates]]
+
[[Category:External link templates using Wikidata]]
[[Category:Gymnastics external link templates]]
 
 
[[Category:Templates that add a tracking category]]
 
[[Category:Templates that add a tracking category]]
 
[[Category:External link templates using Wikidata]]
 
 
}}</includeonly>
 
}}</includeonly>

Revision as of 11:57, 7 March 2017

Template:Uses Wikidata Template:Tracks Wikidata

Template:FIG displays an external link to an gymnast's profile at FIG-gymnastics.com, the official website of the International Federation of Gymnastics (FIG: Fédération Internationale de Gymnastique). It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

{{FIG | ID }}
{{FIG | ID | NAME }}

Named parameters:

{{FIG | id= ID }}
{{FIG | id= ID | name= NAME }}
{{FIG | id= ID | brief= yes }}
{{FIG | id= ID | name= NAME | brief= yes }}

Using Wikidata property P2696:

{{FIG}}
{{FIG | name= NAME }}
{{FIG | brief= yes }}
{{FIG | name= NAME | brief= yes }}

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 FIG

This template displays an external link to an gymnast's profile at FIG-gymnastics.com, the official website of the International Federation of Gymnastics (FIG: Fédération Internationale de Gymnastique). 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: 13822 is the ID portion of https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl=. This parameter is optional if Wikidata property P2696 exists, but required if not.

Default
Wikidata property P2696
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 gymnast. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(gymnast)".

Default
{{PAGENAMEBASE}}
Stringoptional
briefbrief

The "brief" parameter may be used to display the external link without the appended description. The value can be "yes", "true", or any text. This parameter is optional.

Stringoptional

Examples

Unnamed parameters

URL:

https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl=

Usage:

{{FIG | 13822 | Alexandra Raisman }}

Output:

Alexandra Raisman at the International Gymnastics FederationTemplate:WikidataCheck

Named parameters

URL:

https://database.fig-gymnastics.com/public/gymnasts/biography/597/true?backUrl=

Usage:

{{FIG |id= 597 |name= Marco Torres }}

Output:

Marco Torres at the International Gymnastics FederationTemplate:WikidataCheck

Usage:

{{FIG |id= 597 |name= Marco Torres |brief= yes }}

Output:

Marco TorresTemplate:WikidataCheck

No parameters and Wikidata property not defined

Usage:

{{FIG}}

Output:

Template:PAGENAMEBASE at the International Gymnastics FederationScript error: No such module "EditAtWikidata".

Tracking categories

"id" parameter exists
"id" parameter does not exist

See also