Difference between revisions of "Template:Cycling Archives/doc"
imported>Zyxw m (Zyxw moved page Template:Cycling archives/doc to Template:Cycling Archives/doc: match move of template) |
imported>Zyxw (update links, misc formatting) |
||
| Line 5: | Line 5: | ||
{{Lua|Module:WikidataCheck}} | {{Lua|Module:WikidataCheck}} | ||
| − | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a cyclist's page at the Cycling Archives web site ([http://www.cyclingarchives.com/ www.CyclingArchives.com]). It is intended for use in the [[Wikipedia:External links| | + | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a cyclist's page at the Cycling Archives web site ([http://www.cyclingarchives.com/ www.CyclingArchives.com]). It is intended for use in the [[Wikipedia:External links|external links]] section of an article. |
== Usage == | == Usage == | ||
Unnamed parameters: | Unnamed parameters: | ||
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|''ID''<nowiki>}}</nowiki></code> | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' <nowiki>}}</nowiki></code> |
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|''ID''|''NAME | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' <nowiki>}}</nowiki></code> |
| − | |||
Named parameters: | Named parameters: | ||
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''<nowiki>}}</nowiki></code> | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' <nowiki>}}</nowiki></code> |
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''|name=''NAME''<nowiki>}}</nowiki></code> | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' <nowiki>}}</nowiki></code> |
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''|name=''NAME''|accessdate=''DATE''<nowiki>}}</nowiki></code> | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | accessdate= ''DATE'' <nowiki>}}</nowiki></code> |
Using [[Wikidata]] property [[d:Property:P1409|P1409]]: | Using [[Wikidata]] property [[d:Property:P1409|P1409]]: | ||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | ||
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|name=''NAME''<nowiki>}}</nowiki></code> | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' <nowiki>}}</nowiki></code> |
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|name=''NAME''|accessdate=''DATE''<nowiki>}}</nowiki></code> | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' | accessdate= ''DATE'' <nowiki>}}</nowiki></code> |
| + | |||
| + | == Examples == | ||
| + | === Unnamed parameters === | ||
| + | ''URL:'' | ||
| + | : <tt>[http://www.cyclingarchives.com/coureurfiche.php?coureurid=5689 http://www.cyclingarchives.com/coureurfiche.php?coureurid={{hilite|5689}}]</tt> | ||
| + | ''Usage:'' | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 5689 | Cadel Evans }}</code> | ||
| + | ''Output:'' | ||
| + | : {{{{BASEPAGENAME}} | 5689 | Cadel Evans }} | ||
| + | |||
| + | === Named parameters === | ||
| + | ''URL:'' | ||
| + | : <tt>[http://www.cyclingarchives.com/coureurfiche.php?coureurid=13500 http://www.cyclingarchives.com/coureurfiche.php?coureurid={{hilite|13500}}]</tt> | ||
| + | ''Usage:'' | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= 13500 |name= Ellen van Dijk |accessdate= 30 March 2013 }}</code> | ||
| + | ''Output:'' | ||
| + | : {{{{BASEPAGENAME}} |id= 13500 |name= Ellen van Dijk |accessdate= 30 March 2013 }} | ||
| + | |||
| + | === No parameters and Wikidata property not defined === | ||
| + | ''Usage:'' | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | ||
| + | ''Output:'' | ||
| + | : {{ {{BASEPAGENAME}} }} | ||
== Parameters == | == Parameters == | ||
| Line 34: | Line 56: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
| − | "description": "This template displays an external link to a cyclist's page at the Cycling Archives web site (www.CyclingArchives.com). It is intended for use in the | + | "description": "This template displays an external link to a cyclist's page at the Cycling Archives web site (www.CyclingArchives.com). It is intended for use in the external links section of an article.", |
"params": { | "params": { | ||
"id": { | "id": { | ||
| Line 40: | Line 62: | ||
"aliases": ["1"], | "aliases": ["1"], | ||
"description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Examples: 5689 is the ID portion of http://www.cyclingarchives.com/coureurfiche.php?coureurid=5689; 13500 is the ID portion of http://www.cyclingarchives.com/coureurfiche.php?coureurid=13500. This parameter is optional if Wikidata property P1409 exists, but required if not.", | "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Examples: 5689 is the ID portion of http://www.cyclingarchives.com/coureurfiche.php?coureurid=5689; 13500 is the ID portion of http://www.cyclingarchives.com/coureurfiche.php?coureurid=13500. This parameter is optional if Wikidata property P1409 exists, but required if not.", | ||
| − | "type": " | + | "type": "number", |
| − | "default": "Wikidata property P1409" | + | "required": false, |
| − | + | "default": "Wikidata property P1409" | |
}, | }, | ||
"name": { | "name": { | ||
| Line 49: | Line 71: | ||
"description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the cyclist. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(cyclist)\".", | "description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the cyclist. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(cyclist)\".", | ||
"type": "string", | "type": "string", | ||
| − | "default": "{{PAGENAMEBASE}}" | + | "required": false, |
| − | + | "default": "{{PAGENAMEBASE}}" | |
}, | }, | ||
"accessdate": { | "accessdate": { | ||
| Line 56: | Line 78: | ||
"description": "The \"accessdate\" parameter may be used to specify the date when the Cycling Archives profile was last accessed. This parameter is optional.", | "description": "The \"accessdate\" parameter may be used to specify the date when the Cycling Archives profile was last accessed. This parameter is optional.", | ||
"type": "date", | "type": "date", | ||
| − | |||
"required": false | "required": false | ||
} | } | ||
| Line 67: | Line 88: | ||
} | } | ||
</templatedata> | </templatedata> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
==Tracking categories== | ==Tracking categories== | ||
; "id" parameter exists | ; "id" parameter exists | ||
| − | * {{clc|Cycling Archives ID | + | * {{clc|Cycling Archives template with ID same as Wikidata}} |
| − | * {{clc|Cycling Archives ID | + | * {{clc|Cycling Archives template with ID different from Wikidata}} |
| − | * {{clc|Cycling Archives ID | + | * {{clc|Cycling Archives template with ID not in Wikidata}} |
; "id" parameter does not exist | ; "id" parameter does not exist | ||
| − | * {{clc|Cycling Archives | + | * {{clc|Cycling Archives template using Wikidata}} |
| − | * {{clc|Cycling Archives | + | * {{clc|Cycling Archives template missing ID and not in Wikidata}} |
==See also== | ==See also== | ||
| − | * [[Template:Cycling | + | * [[Template:Cycling Archives race]] |
| − | * [[Template:Cycling | + | * [[Template:Cycling Archives race report]] |
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
Revision as of 16:58, 10 April 2017
| 40px | This is a documentation subpage for Template:Cycling Archives. 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:Cycling Archives displays an external link to a cyclist's page at the Cycling Archives web site (www.CyclingArchives.com). It is intended for use in the external links section of an article.
Contents
Usage
Unnamed parameters:
{{Cycling Archives | ID }}{{Cycling Archives | ID | NAME }}
Named parameters:
{{Cycling Archives | id= ID }}{{Cycling Archives | id= ID | name= NAME }}{{Cycling Archives | id= ID | name= NAME | accessdate= DATE }}
Using Wikidata property P1409:
{{Cycling Archives}}{{Cycling Archives | name= NAME }}{{Cycling Archives | name= NAME | accessdate= DATE }}
Examples
Unnamed parameters
URL:
Usage:
{{Cycling Archives | 5689 | Cadel Evans }}
Output:
- Cadel Evans at Cycling ArchivesScript error: No such module "EditAtWikidata".Template:WikidataCheck
Named parameters
URL:
Usage:
{{Cycling Archives |id= 13500 |name= Ellen van Dijk |accessdate= 30 March 2013 }}
Output:
- Ellen van Dijk at Cycling Archives. Retrieved 30 March 2013.Script error: No such module "EditAtWikidata".Template:WikidataCheck
No parameters and Wikidata property not defined
Usage:
{{Cycling Archives}}
Output:
- Template:PAGENAMEBASE at Cycling ArchivesScript error: No such module "EditAtWikidata".Template:WikidataCheck
Parameters
The id parameter (or unnamed parameter 1) should contain the ID portion the URL for the cyclist's page at the Cycling Archives web site. Examples: 5689 is the ID portion of http://www.cyclingarchives.com/coureurfiche.php?coureurid=5689; 13500 is the ID portion of http://www.cyclingarchives.com/coureurfiche.php?coureurid=13500. This parameter is optional if Wikidata property P1409 exists, but required if not.
The name parameter (or unnamed parameter 2) may be used to specify the link text, which should be the name of the cyclist. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(cyclist)".
The accessdate parameter may be used to specify the date when the Cycling Archives profile was last accessed. This parameter is optional.
TemplateData
TemplateData for Cycling Archives
This template displays an external link to a cyclist's page at the Cycling Archives web site (www.CyclingArchives.com). 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. Examples: 5689 is the ID portion of http://www.cyclingarchives.com/coureurfiche.php?coureurid=5689; 13500 is the ID portion of http://www.cyclingarchives.com/coureurfiche.php?coureurid=13500. This parameter is optional if Wikidata property P1409 exists, but required if not.
| Number | 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 cyclist. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(cyclist)".
| String | optional |
| Access date | accessdate | The "accessdate" parameter may be used to specify the date when the Cycling Archives profile was last accessed. This parameter is optional. | Date | optional |
Tracking categories
- "id" parameter exists
- Category:Cycling Archives template with ID same as Wikidata (0)
- Category:Cycling Archives template with ID different from Wikidata (0)
- Category:Cycling Archives template with ID not in Wikidata (0)
- "id" parameter does not exist
- Category:Cycling Archives template using Wikidata (0)
- Category:Cycling Archives template missing ID and not in Wikidata (0)
See also