Difference between revisions of "Template:FIDE/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(create template documentation, including categories)
 
imported>Zyxw
m (module note)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])-->
+
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 +
{{Uses Wikidata|P1440}}
 +
{{Tracks Wikidata|P1440}}
 +
{{Lua|Module:EditAtWikidata|Module:WikidataCheck}}
  
 
This template generates an external link to a chess player's page at [[FIDE]].
 
This template generates an external link to a chess player's page at [[FIDE]].
  
 
== Usage ==
 
== Usage ==
One parameter:
+
; No parameters (uses ID from Wikidata and page name)
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}}}</code>
 +
 
 +
; One parameter:
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
  
Two parameters:
+
; Two parameters:
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
Line 38: Line 44:
 
"description": "ID number used in the URL.",
 
"description": "ID number used in the URL.",
 
"type": "number",
 
"type": "number",
"required": true,
+
"required": false,
 
"aliases": [ "1" ]
 
"aliases": [ "1" ]
 
},
 
},
Line 52: Line 58:
 
</templatedata>
 
</templatedata>
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
+
==Tracking categories==
<!--Categories below this line, please; interwikis at Wikidata-->
+
* {{clc|FIDE ID not in Wikidata}}
 +
* {{clc|FIDE ID different from Wikidata}}
 +
* {{clc|FIDE ID same as Wikidata}}
 +
* {{cl|Fide template with no ID set}} (exists in template, not created)
 +
 
 +
<includeonly>{{sandbox other||
 +
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Chess templates]]
 
[[Category:Chess 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:Templates that add a tracking category]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 04:32, 10 May 2019

Template:Uses Wikidata Template:Tracks Wikidata

This template generates an external link to a chess player's page at FIDE.

Usage

No parameters (uses ID from Wikidata and page name)
{{FIDE}}
One parameter
{{FIDE | ID }}
{{FIDE | id= ID }}
Two parameters
{{FIDE | ID | NAME }}
{{FIDE | id= ID | name= NAME }}

Examples

http://ratings.fide.com/card.phtml?event=2020009

One parameter:

  1. {{FIDE | 2020009 }}
    Template:PAGENAMEBASE rating card at FIDEScript error: No such module "EditAtWikidata".Template:WikidataCheck
  2. {{FIDE | id= 2020009 }}
    Template:PAGENAMEBASE rating card at FIDEScript error: No such module "EditAtWikidata".Template:WikidataCheck

Two parameters:

  1. {{FIDE | 2020009 | Fabiano Caruana }}
    Fabiano Caruana rating card at FIDEScript error: No such module "EditAtWikidata".Template:WikidataCheck
  2. {{FIDE | id= 2020009 | name= Fabiano Caruana }}
    Fabiano Caruana rating card at FIDEScript error: No such module "EditAtWikidata".Template:WikidataCheck

Template data

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 FIDE

This template generates an external link to a chess player's page at FIDE.

Template parameters

ParameterDescriptionTypeStatus
IDid 1

ID number used in the URL.

Numberoptional
Namename 2

Name displayed as the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation.

Stringoptional

Tracking categories