Difference between revisions of "Template:CFF player/doc"
imported>Zyxw (create documentation with examples, TemplateData, categories) |
imported>Zyxw (updates for use of Wikidata property P3577 if no "id") |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata --> | <!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata --> | ||
| − | {{Wikidata | + | {{Uses Wikidata|P3577}} |
| + | {{Lua|Module:EditAtWikidata}} | ||
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[association football]] ([[soccer]]) player's page at the [[Croatian Football Federation]] website ([http://hns-cff.hr/ hns-cff.hr]). It is intended for use in the [[Wikipedia:External links|external links]] section of an article. | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[association football]] ([[soccer]]) player's page at the [[Croatian Football Federation]] website ([http://hns-cff.hr/ hns-cff.hr]). It is intended for use in the [[Wikipedia:External links|external links]] section of an article. | ||
| Line 13: | Line 14: | ||
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> }} | : {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> }} | ||
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> }} | : {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> }} | ||
| + | |||
| + | Using [[Wikidata]] property [[d:Property:P3577|P3577]]: | ||
| + | : {{tlcw|{{BASEPAGENAME}}}} | ||
| + | : {{tlcw|{{BASEPAGENAME}} | name{{=}} <var>NAME</var> }} | ||
== Examples == | == Examples == | ||
| Line 31: | Line 36: | ||
''Output:'' | ''Output:'' | ||
: {{{{BASEPAGENAME}} | id= 136326/jorge-sammir-cruz-campos | name= Jorge Sammir Cruz Campos }} | : {{{{BASEPAGENAME}} | id= 136326/jorge-sammir-cruz-campos | name= Jorge Sammir Cruz Campos }} | ||
| + | |||
| + | === No parameters and Wikidata property not defined === | ||
| + | ''Usage:'' | ||
| + | : {{tlcw|{{BASEPAGENAME}}}} | ||
| + | ''Output:'' | ||
| + | : {{{{BASEPAGENAME}}<!-- -->}} | ||
== TemplateData == | == TemplateData == | ||
| Line 41: | Line 52: | ||
"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: 14831/vedran-corluka is the ID portion of http://hns-cff.hr/en/players/14831/vedran-corluka/.", | + | "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 14831/vedran-corluka is the ID portion of http://hns-cff.hr/en/players/14831/vedran-corluka/. This parameter is optional if Wikidata property P3577 exists, but required if not.", |
"type": "string", | "type": "string", | ||
| − | "required": | + | "required": false, |
| + | "default": "Wikidata property P3577" | ||
}, | }, | ||
"name": { | "name": { | ||
| Line 66: | Line 78: | ||
[[Category:People and person external link templates]] | [[Category:People and person external link templates]] | ||
[[Category:Croatia football templates]] | [[Category:Croatia football templates]] | ||
| + | [[Category:External link templates using Wikidata]] | ||
}}</includeonly> | }}</includeonly> | ||
Revision as of 01:00, 30 March 2017
| 40px | This is a documentation subpage for Template:CFF player. It contains usage information, categories and other content that is not part of the original template page. |
| 30px | This template uses Lua: |
Template:CFF player displays an external link to an association football (soccer) player's page at the Croatian Football Federation website (hns-cff.hr). It is intended for use in the external links section of an article.
Contents
Usage
Unnamed parameters:
Named parameters:
Using Wikidata property P3577:
Examples
Unnamed parameters
URL:
Usage:
Output:
- Vedran Ćorluka at the Croatian Football FederationScript error: No such module "EditAtWikidata".Template:WikidataCheck
Named parameters
URL:
Usage:
Output:
- Jorge Sammir Cruz Campos at the Croatian Football FederationScript error: No such module "EditAtWikidata".Template:WikidataCheck
No parameters and Wikidata property not defined
Usage:
Output:
- Template:PAGENAMEBASE at the Croatian Football FederationScript error: No such module "EditAtWikidata".Template:WikidataCheck
TemplateData
TemplateData for CFF player
This template displays an external link to an association football (soccer) player's page at the Croatian Football Federation website (hns-cff.hr). It is intended for use in the external links section of an article.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| id | id 1 | The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: 14831/vedran-corluka is the ID portion of http://hns-cff.hr/en/players/14831/vedran-corluka/. This parameter is optional if Wikidata property P3577 exists, but required if not.
| String | optional |
| name | name 2 | The "name" parameter (or unnamed parameter "2") may be used to specify the link text, which should be the name of the player. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(footballer)" or "(soccer)".
| String | optional |