Template:CQ Ranking/doc
This is a documentation subpage for Template:CQ Ranking. 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:CQ Ranking displays an external link to a cyclist's page at the CQ Ranking web site (cqranking.com). It is intended for use in the External links section of an article.
Contents
Usage
Unnamed parameters:
{{CQ Ranking | GENDER | ID }}
{{CQ Ranking | GENDER | ID | NAME }}
Named parameters:
{{CQ Ranking | gender=GENDER | id=ID }}
{{CQ Ranking | gender=GENDER | id=ID | name=NAME }}
Using Wikidata property P1541 (men) or P2709 (women):
{{CQ Ranking}}
{{CQ Ranking | name=NAME }}
Examples
Unnamed parameters
Men
URL:
Usage:
{{CQ Ranking | m | 1 | Paolo Bettini }}
Output:
- Paolo Bettini at CQ Ranking
Women
URL:
Usage:
{{CQ Ranking | w | 1 | Judith Arndt }}
Output:
- Judith Arndt at CQ Ranking
Named parameters
Men
URL:
Usage:
{{CQ Ranking | gender= m | id= 10000 | name= Fabian Schaar }}
Output:
- Fabian Schaar at CQ Ranking
Women
URL:
Usage:
{{CQ Ranking | gender= w | id= 10000 | name= Katrina Polack }}
Output:
- Katrina Polack at CQ Ranking
No parameters and Wikidata property not defined
Usage:
{{CQ Ranking}}
Output:
- Template:PAGENAMEBASE at CQ RankingScript error: No such module "EditAtWikidata".
Parameters
- The
gender
parameter (or unnamed parameter1
) should contain the letter "m" for men or "w" for women (without the quotation marks). This parameter is required when using theid
parameter (or unnamed parameter2
) because the CQ Ranking website uses a different URL for male and female cyclists. - The
id
parameter (or unnamed parameter2
) should contain the ID portion the URL for the cyclist's page at the CQ Ranking web site. This parameter is optional if Wikidata property P1541 (men) or P2709 (women) exists, but required if not. Examples:- The ID for male cyclist Paolo Bettini is 1 and the URL is https://cqranking.com/men/asp/gen/rider.asp?riderid=1.
- The ID for female cyclist Judith Arndt is 1 and the URL is https://cqranking.com/women/asp/gen/rider.asp?riderid=1.
- The
name
parameter (or unnamed parameter3
) 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)".
TemplateData
TemplateData for CQ Ranking
This template displays an external link to a cyclist's page at the CQ Ranking web site (cqranking.com). It is intended for use in the External links section of an article.
Parameter | Description | Type | Status | |
---|---|---|---|---|
gender | gender 1 | The "gender" parameter (or unnamed parameter "1") should contain the letter "m" for men or "w" for women (without the quotation marks). This parameter is required when using the "id" parameter (or unnamed parameter "2") because the CQ Ranking website uses a different URL for male and female cyclists.
| String | optional |
id | id 2 | The "id" parameter (or unnamed parameter "2") should contain the ID portion of the URL. This parameter is optional if Wikidata property P1541 (men) or P2709 (women) exists, but required if not. Examples: The ID for male cyclist Paolo Bettini is 1 and the URL is https://cqranking.com/men/asp/gen/rider.asp?riderid=1. The ID for female cyclist Judith Arndt is 1 and the URL is https://cqranking.com/women/asp/gen/rider.asp?riderid=1.
| Number | optional |
name | name 3 | The "name" parameter (or unnamed parameter "3") 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 |
Tracking categories
- "id" parameter exists
- Category:CQ Ranking template for male cyclist (0)
- Category:CQ Ranking template for female cyclist (0)
- Category:CQ Ranking template with unknown value for gender (0)
- "id" parameter does not exist
- Category:CQ Ranking template using Wikidata (0)
- Category:CQ Ranking template missing ID and not in Wikidata (0)
See also
- Template:Cycling Archives which uses Wikidata property Template:Wpl
- Template:ProCyclingStats which uses Wikidata property Template:Wpl