Difference between revisions of "Template:ISSF/doc"
imported>Zyxw (create documentation) |
imported>Jonesey95 |
||
| (12 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
| − | <!-- | + | <!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> |
| + | {{Uses Wikidata|P2730}} | ||
| + | {{Tracks Wikidata|P2730}} | ||
| + | {{Lua|Module:EditAtWikidata|Module:WikidataCheck}} | ||
| − | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to | + | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a [[shooting sport]] athlete's page at [http://www.issf-sports.org/ ISSF-sports.org], the official website of the [[International Shooting Sport Federation]] (ISSF). It is intended for use in the [[Wikipedia:External links|external links]] section of an article. |
== Usage == | == Usage == | ||
| − | + | Unnamed parameters: | |
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code> | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code> | ||
| + | |||
| + | 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> | ||
| − | + | Using [[Wikidata]] property [[d:Property:P2730|P2730]]: | |
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> |
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code> |
== TemplateData == | == TemplateData == | ||
| Line 17: | Line 24: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
| − | "description": "This template displays an external link to | + | "description": "This template displays an external link to a shooting sport athlete's page at ISSF-sports.org, the official website of the International Shooting Sport Federation (ISSF). It is intended for use in the external links section of an article.", |
"params": { | "params": { | ||
| − | " | + | "id": { |
"label": "ID", | "label": "ID", | ||
| − | "aliases": [" | + | "aliases": ["1"], |
| − | "description": "ID portion of URL | + | "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: SHCHNW0605198901 is the ID portion of http://www.issf-sports.org/athletes/athlete.ashx?personissfid=SHCHNW0605198901. This parameter is optional if Wikidata property P2730 exists, but required if not.", |
"type": "string", | "type": "string", | ||
| − | "default": "", | + | "default": "Wikidata property P2730", |
"required": true | "required": true | ||
}, | }, | ||
| − | " | + | "name": { |
"label": "Name", | "label": "Name", | ||
| − | "aliases": [" | + | "aliases": ["2"], |
| − | "description": " | + | "description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the shooting sport athlete. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(sport shooter)\".", |
"type": "string", | "type": "string", | ||
"default": "{{PAGENAMEBASE}}", | "default": "{{PAGENAMEBASE}}", | ||
| Line 47: | Line 54: | ||
== Examples == | == Examples == | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | === Unnamed parameters === | |
| − | : | + | ''URL:'' |
| − | : <code> | + | : <code>[http://www.issf-sports.org/athletes/athlete.ashx?personissfid=SHUSAM1912198501 http://www.issf-sports.org/athletes/athlete.ashx?personissfid={{hilite|SHUSAM1912198501}}]</code> |
| − | + | ''Usage:'' | |
| − | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | SHUSAM1912198501 | Joshua Richmond }}</code> | |
| − | + | ''Output:'' | |
| − | + | : {{{{BASEPAGENAME}} | SHUSAM1912198501 | Joshua Richmond }} | |
| − | < | + | === Named parameters === |
| + | ''URL:'' | ||
| + | : <code>[http://www.issf-sports.org/athletes/athlete.ashx?personissfid=SHCHNW0605198901 http://www.issf-sports.org/athletes/athlete.ashx?personissfid={{hilite|SHCHNW0605198901}}]</code> | ||
| + | ''Usage:'' | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= SHCHNW0605198901 |name= Yi Siling }}</code> | ||
| + | ''Output:'' | ||
| + | : {{{{BASEPAGENAME}} |id= SHCHNW0605198901 |name= Yi Siling }} | ||
| + | |||
| + | === No parameters and Wikidata property not defined === | ||
| + | ''Usage:'' | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | ||
| + | ''Output:'' | ||
| + | : {{ {{BASEPAGENAME}} }} | ||
| + | |||
| + | == Tracking categories == | ||
| + | ; ID parameter exists | ||
| + | * {{clc|ISSF template with ID different from Wikidata}} | ||
| + | * {{clc|ISSF template with ID not in Wikidata}} | ||
| + | ; ID parameter does not exist | ||
| + | * {{clc|ISSF template missing ID and not in Wikidata}} | ||
| + | |||
| + | == External links == | ||
| + | * [http://www.issf-sports.org/athletes.ashx Athlete search at ISSF-sports.org] | ||
| + | |||
| + | <includeonly>{{sandbox other|| | ||
<!-- Categories go here, and interwikis go in Wikidata --> | <!-- Categories go here, and interwikis go in Wikidata --> | ||
| + | [[Category:Shooting templates]] | ||
[[Category:People and person external link templates]] | [[Category:People and person external link templates]] | ||
| − | [[Category:Sports external link templates]] | + | [[Category:Sports governing body external link templates]] |
| − | [[Category: | + | [[Category:Templates that add a tracking category]] |
| + | [[Category:External link templates using Wikidata]] | ||
| + | [[Category:External link templates with archive parameter]] | ||
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 17:03, 24 May 2020
| This is a documentation subpage for Template:ISSF. It contains usage information, categories and other content that is not part of the original template page. |
Template:Uses Wikidata Template:Tracks Wikidata
| This template uses Lua: |
Template:ISSF displays an external link to a shooting sport athlete's page at ISSF-sports.org, the official website of the International Shooting Sport Federation (ISSF). It is intended for use in the external links section of an article.
Contents
Usage
Unnamed parameters:
{{ISSF | ID }}{{ISSF | ID | NAME }}
Named parameters:
{{ISSF | id= ID }}{{ISSF | id= ID | name= NAME }}
Using Wikidata property P2730:
{{ISSF}}{{ISSF | name= NAME }}
TemplateData
TemplateData for ISSF
This template displays an external link to a shooting sport athlete's page at ISSF-sports.org, the official website of the International Shooting Sport Federation (ISSF). 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: SHCHNW0605198901 is the ID portion of http://www.issf-sports.org/athletes/athlete.ashx?personissfid=SHCHNW0605198901. This parameter is optional if Wikidata property P2730 exists, but required if not.
| String | required |
| 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 shooting sport athlete. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(sport shooter)".
| String | optional |
Instructions
- Go to ISSF-sports.org and search for an athlete
- Click on the correct link to go to the athlete's page
- The page URL should look like
http://www.issf-sports.org/athletes/athlete.ashx?personissfid=AAAAAAnnnnnnnnnn- where "AAAAAAnnnnnnnnnn" indicates the alphanumeric ID string for a specific athlete.
Examples
Unnamed parameters
URL:
Usage:
{{ISSF | SHUSAM1912198501 | Joshua Richmond }}
Output:
- Joshua Richmond at the International Shooting Sport FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck
Named parameters
URL:
Usage:
{{ISSF |id= SHCHNW0605198901 |name= Yi Siling }}
Output:
- Yi Siling at the International Shooting Sport FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck
No parameters and Wikidata property not defined
Usage:
{{ISSF}}
Output:
- Template:PAGENAMEBASE at the International Shooting Sport FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck
Tracking categories
- ID parameter exists
- Category:ISSF template with ID different from Wikidata (0)
- Category:ISSF template with ID not in Wikidata (0)
- ID parameter does not exist
External links