Nothing Special   »   [go: up one dir, main page]

Jump to content

Template:Cycling Archives/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
update TemplateData, update categories
merge templates
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
{{High-use}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template redirect|Cycling Archives cyclist|Cycling Archives rider}}
{{Uses Wikidata|P1409}}
{{Tracks Wikidata|P1409}}
{{Tracks and uses Wikidata|P1409}}
{{Lua|Module:WikidataCheck}}
{{Lua|Module:EditAtWikidata|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|External links]] section of an article.
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a cyclist's page at the Cycling Archives website ([http://www.cyclingarchives.com/ 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}} | <var>ID</var> <nowiki>}}</nowiki></code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|''ID''|''NAME''<nowiki>}}</nowiki></code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> <nowiki>}}</nowiki></code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|''ID''|''NAME''|accessdate=''DATE''<nowiki>}}</nowiki></code>


Named parameters:
; Named parameters
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''<nowiki>}}</nowiki></code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= <var>ID</var> <nowiki>}}</nowiki></code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''|name=''NAME''<nowiki>}}</nowiki></code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= <var>ID</var> | name= <var>NAME</var> <nowiki>}}</nowiki></code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''|name=''NAME''|accessdate=''DATE''<nowiki>}}</nowiki></code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= <var>ID</var> | name= <var>NAME</var> | accessdate= <var>DATE</var> <nowiki>}}</nowiki></code>


Using [[Wikidata]] property [[d:Property:P1409|P1409]]:
; Using Wikidata property
: <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= <var>NAME</var> <nowiki>}}</nowiki></code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|name=''NAME''|accessdate=''DATE''<nowiki>}}</nowiki></code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= <var>NAME</var> | accessdate= <var>DATE</var> <nowiki>}}</nowiki></code>

== Examples ==
=== Unnamed parameters ===
; URL
: <kbd>[http://www.cyclingarchives.com/coureurfiche.php?coureurid=5689 http://www.cyclingarchives.com/coureurfiche.php?coureurid={{Highlight|5689}}]</kbd>

; Usage
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 5689 | Cadel Evans }}</code>

; Output
:* {{{{BASEPAGENAME}} | 5689 | Cadel Evans }}

=== Named parameters ===
; URL
: <kbd>[http://www.cyclingarchives.com/coureurfiche.php?coureurid=13500 http://www.cyclingarchives.com/coureurfiche.php?coureurid={{Highlight|13500}}]</kbd>

; 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 ==
The <code>id</code> parameter (or [[Help:Template#Parameters|unnamed parameter]] <code>1</code>) should contain the ID portion the [[URL]] for the cyclist's page at the Cycling Archives web site. Examples: {{hilite|5689}} is the ID portion of [http://www.cyclingarchives.com/coureurfiche.php?coureurid=5689 http://www.cyclingarchives.com/coureurfiche.php?coureurid={{hilite|5689}}]; {{hilite|13500}} is the ID portion of [http://www.cyclingarchives.com/coureurfiche.php?coureurid=13500 http://www.cyclingarchives.com/coureurfiche.php?coureurid={{hilite|13500}}]. This parameter is optional if [[Wikidata]] property [[d:Property:P1409|P1409]] exists, but required if not.
The <code>id</code> parameter (or [[Help:Template#Parameters|unnamed parameter]] <code>1</code>) should contain the ID portion the [[URL]] for the cyclist's page at the Cycling Archives web site. Examples: {{hilite|5689}} is the ID portion of [http://www.cyclingarchives.com/coureurfiche.php?coureurid=5689 http://www.cyclingarchives.com/coureurfiche.php?coureurid={{hilite|5689}}]. This parameter is optional if [[Wikidata]] property [[d:Property:P1409|P1409]] exists, but required if not.


The <code>name</code> parameter (or unnamed parameter <code>2</code>) 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 <code>name</code> parameter (or unnamed parameter <code>2</code>) 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)".
Line 34: Line 62:
<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 External links section of an article.",
"description": "This template displays an external link to a cyclist's page at the Cycling Archives website (CyclingArchives.com). It is intended for use in the external links section of an article.",
"params": {
"params": {
"id": {
"id": {
"label": "ID",
"label": "ID",
"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 number in the URL, such as 5689 in http://www.cyclingarchives.com/coureurfiche.php?coureurid=5689. This parameter is optional if Wikidata property P1409 exists, but required if not.",
"type": "string",
"default": "Wikidata property P1409",
"default": "Wikidata property P1409",
"type": "number",
"required": false
"required": false
},
},
Line 47: Line 75:
"label": "Name",
"label": "Name",
"aliases": ["2"],
"aliases": ["2"],
"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 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",
"default": "{{PAGENAMEBASE}}",
"default": "{{PAGENAMEBASE}}",
"type": "string",
"required": false
"required": false
},
},
"accessdate": {
"accessdate": {
"label": "Access date",
"label": "Access Date",
"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 date when the Cycling Archives profile was last accessed. This parameter is optional.",
"type": "date",
"type": "date",
"default": "",
"required": false
"required": false
}
}
Line 67: Line 94:
}
}
</templatedata>
</templatedata>

== 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}} }}


==Tracking categories==
==Tracking categories==
; template with ID
; "id" parameter exists
* {{clc|Cycling Archives ID (cyclist) not in Wikidata}}
* {{clc|Cycling Archives template with ID different from Wikidata}}
* {{clc|Cycling Archives ID (cyclist) different from Wikidata}}
* {{clc|Cycling Archives template with ID not in Wikidata}}
; template missing ID
* {{clc|Cycling Archives ID (cyclist) same as Wikidata}}
* {{clc|Cycling Archives template missing ID and not in Wikidata}}
; "id" parameter does not exist
* {{clc|Cycling Archives cyclist template using Wikidata}}
* {{clc|Cycling Archives cyclist template missing ID}}


==See also==
==See also==
; Cycling Archives external link templates and Wikidata properties
* [[Template:Cycling archives race]]
* [[Template:Cycling archives race report]]
* [[Template:Cycling Archives race]]
* [[Template:Cycling Archives race report]] which uses Wikidata property {{wpl|P2330}}
* Wikidata property {{wpl|P2331}}
; ProCyclingStats external link templates and Wikidata properties
* [[Template:ProCyclingStats]] which uses Wikidata property {{wpl|P1663}}
* [[Template:ProCyclingStats race]] which uses Wikidata property {{wpl|P2327}}
* [[Template:ProCyclingStats team]] which uses Wikidata property {{wpl|P2328}}
; CQ Ranking external link templates and Wikidata properties
* [[Template:CQ Ranking]] which uses Wikidata properties {{wpl|P1541}} and {{wpl|P2709}}
* Wikidata properties {{wpl|P2648}} and {{wpl|P2708}}
* Wikidata property {{wpl|P2649}}
; CycleBase external link templates and Wikidata properties
* [[Template:CycleBase]] which uses Wikidata property {{wpl|P4508}}


<includeonly>{{sandbox other||
<includeonly>{{sandbox other||
Line 108: Line 122:
[[Category:Cycling external link templates]]
[[Category:Cycling external link templates]]
[[Category:People and person external link templates]]
[[Category:People and person external link templates]]
[[Category:External link templates with accessdate parameter]]
[[Category:External link templates using Wikidata]]
[[Category:External link templates using Wikidata]]
[[Category:Templates that add a tracking category]]
[[Category:Templates that add a tracking category]]

Latest revision as of 09:17, 5 August 2024

Template:Cycling Archives displays an external link to a cyclist's page at the Cycling Archives website (CyclingArchives.com). It is intended for use in the external links section of an article.

Usage

[edit]
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
{{Cycling Archives}}
{{Cycling Archives | name= NAME }}
{{Cycling Archives | name= NAME | accessdate= DATE }}

Examples

[edit]

Unnamed parameters

[edit]
URL
http://www.cyclingarchives.com/coureurfiche.php?coureurid=5689
Usage
* {{Cycling Archives | 5689 | Cadel Evans }}
Output

Named parameters

[edit]
URL
http://www.cyclingarchives.com/coureurfiche.php?coureurid=13500
Usage
* {{Cycling Archives |id= 13500 |name= Ellen van Dijk |accessdate= 30 March 2013 }}
Output

No parameters and Wikidata property not defined

[edit]
Usage
* {{Cycling Archives}}
Output

Parameters

[edit]

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. 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

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Cycling Archives in articles based on its TemplateData.

TemplateData for Cycling Archives

This template displays an external link to a cyclist's page at the Cycling Archives website (CyclingArchives.com). It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
IDid 1

The ID number in the URL, such as 5689 in http://www.cyclingarchives.com/coureurfiche.php?coureurid=5689. This parameter is optional if Wikidata property P1409 exists, but required if not.

Default
Wikidata property P1409
Numberoptional
Namename 2

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)".

Default
{{PAGENAMEBASE}}
Stringoptional
Access Dateaccessdate

The date when the Cycling Archives profile was last accessed. This parameter is optional.

Dateoptional

Tracking categories

[edit]
template with ID
template missing ID

See also

[edit]
Cycling Archives external link templates and Wikidata properties
ProCyclingStats external link templates and Wikidata properties
CQ Ranking external link templates and Wikidata properties
CycleBase external link templates and Wikidata properties