Difference between revisions of "Template:FIG/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(update category links, misc formatting)
imported>Zyxw
(add new URL, misc formatting)
Line 8: Line 8:
  
 
== Usage ==
 
== Usage ==
Unnamed parameters:
+
; Unnamed parameters
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
  
Named parameters:
+
; Named parameters
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
Line 18: Line 18:
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | brief= ''yes'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | brief= ''yes'' }}</code>
  
Using [[Wikidata]] property [[d:Property:P2696|P2696]]:
+
; Using [[Wikidata]] property {{WPL|id=o|P2696}}
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code>
Line 26: Line 26:
 
== Examples ==
 
== Examples ==
 
=== Unnamed parameters ===
 
=== Unnamed parameters ===
''URL:''
+
; URLs
: <tt>[https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl= https://database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|13822}}/true?backUrl=]</tt>
+
: <kbd>[https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl= https://database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|13822}}/true?backUrl=]</kbd>
''Usage:''
+
: <kbd>[http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=13822&type=licence http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id={{hilite|13822}}&type=licence]</kbd>
 +
 
 +
; Usage
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 13822 | Alexandra Raisman }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 13822 | Alexandra Raisman }}</code>
''Output:''
+
 
 +
; Output
 
: {{{{BASEPAGENAME}} | 13822 | Alexandra Raisman }}
 
: {{{{BASEPAGENAME}} | 13822 | Alexandra Raisman }}
  
 
=== Named parameters ===
 
=== Named parameters ===
''URL:''
+
; URLs
: <tt>[https://database.fig-gymnastics.com/public/gymnasts/biography/597/true?backUrl= https://database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|597}}/true?backUrl=]</tt>
+
: <kbd>[https://database.fig-gymnastics.com/public/gymnasts/biography/597/true?backUrl= https://database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|597}}/true?backUrl=]</kbd>
''Usage:''
+
: <kbd>[http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=597&type=licence http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id={{hilite|597}}&type=licence]</kbd>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= 597 |name= Marco Torres }}</code>
+
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= 597 |name= Marco Torres |brief= yes }}</code>
+
; Usage
''Output:''
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 597 | name= Marco Torres }}</code>
: {{{{BASEPAGENAME}} |id= 597 |name= Marco Torres }}
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 597 | name= Marco Torres | brief= yes }}</code>
: {{{{BASEPAGENAME}} |id= 597 |name= Marco Torres |brief= yes }}
+
 
 +
; Output
 +
: {{{{BASEPAGENAME}} | id= 597 | name= Marco Torres }}
 +
: {{{{BASEPAGENAME}} | id= 597 | name= Marco Torres | brief= yes }}
  
 
=== No parameters and Wikidata property not defined ===
 
=== No parameters and Wikidata property not defined ===
''Usage:''
+
; Usage
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
''Output:''
+
 
 +
; Output
 
: {{ {{BASEPAGENAME}} }}
 
: {{ {{BASEPAGENAME}} }}
  
Line 58: Line 65:
 
       "label": "id",
 
       "label": "id",
 
       "aliases": ["1"],  
 
       "aliases": ["1"],  
       "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.",
+
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 13822 is the ID portion of http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=13822&type=licence or https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl=. This parameter is optional if Wikidata property P2696 exists, but required if not.",
 
       "type": "number",
 
       "type": "number",
 
       "default": "Wikidata property P2696",
 
       "default": "Wikidata property P2696",

Revision as of 07:30, 31 July 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 Template:WPL
{{FIG}}
{{FIG | name= NAME }}
{{FIG | brief= yes }}
{{FIG | name= NAME | brief= yes }}

Examples

Unnamed parameters

URLs
https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl=
http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=13822&type=licence
Usage
{{FIG | 13822 | Alexandra Raisman }}
Output
Alexandra Raisman at the International Gymnastics FederationTemplate:WikidataCheck

Named parameters

URLs
https://database.fig-gymnastics.com/public/gymnasts/biography/597/true?backUrl=
http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=597&type=licence
Usage
{{FIG | id= 597 | name= Marco Torres }}
{{FIG | id= 597 | name= Marco Torres | brief= yes }}
Output
Marco Torres at the International Gymnastics FederationTemplate:WikidataCheck
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".

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 http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=13822&type=licence or 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

Tracking categories

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

See also