Template:Association of Tennis Professionals link/doc: Difference between revisions
update documentation and examples, add TemplateData |
→TemplateData: Updated PAGENAME to PAGENAMEBASE |
||
Line 32: | Line 32: | ||
"description": "Name to be displayed in the link text. If not given it defaults to the Wikipedia article name, without any disambiguation such as (tennis).", |
"description": "Name to be displayed in the link text. If not given it defaults to the Wikipedia article name, without any disambiguation such as (tennis).", |
||
"type": "string", |
"type": "string", |
||
"default": "{{ |
"default": "{{PAGENAMEBASE}}", |
||
"required": false |
"required": false |
||
} |
} |
Revision as of 18:55, 9 August 2015
This is a documentation subpage for Template:Association of Tennis Professionals link. It may contain usage information, categories and other content that is not part of the original template page. |
Template:Association of Tennis Professionals link displays an external link to a player's profile at the Association of Tennis Professionals (ATP) website.
Usage
One parameter:
{{Association of Tennis Professionals link | ID }}
{{Association of Tennis Professionals link | id= ID }}
Two parameters:
{{Association of Tennis Professionals link | ID | NAME }}
{{Association of Tennis Professionals link | id= ID | name= NAME }}
TemplateData
TemplateData for Association of Tennis Professionals link
This template displays an external link to a player's profile at the Association of Tennis Professionals (ATP) website.
Parameter | Description | Type | Status | |
---|---|---|---|---|
ID | 1 id | Identification string in the URL. Example: A092 is the ID number in http://www.atpworldtour.com/Tennis/Players/A092.aspx
| String | required |
Name | 2 name | Name to be displayed in the link text. If not given it defaults to the Wikipedia article name, without any disambiguation such as (tennis).
| String | optional |
Instructions
To find the id number:
- Go to the player's ATP profile page
- In the "Head to head" edit box on the right enter any player and submit
- You'll see their head to head record, and pId in the URL is the ID in question
* copied from GregorB's comment at WikiProject Tennis
Another way to find the id number:
- Go to the player's ATP profile page.
- View the HTML source of the page (found via the pop-up menu when right-clicking somewhere on the page).
- Search for the text "initPlayerLiveScoreParams", and use the code following that string.
The name parameter is optional. It defaults to the page name, so it is necessary to provide it only when the player's name differs from the article name.
Examples
One parameter
The following examples show a link to the page for Andre Agassi:
http://www.atpworldtour.com/Tennis/Players/A092.aspx
Usage:
{{Association of Tennis Professionals link | A092 }}
{{Association of Tennis Professionals link | id= A092 }}
Results:
- Association of Tennis Professionals link/doc at the Association of Tennis Professionals
- Association of Tennis Professionals link/doc at the Association of Tennis Professionals
Two parameters
The following examples show a link to the page for Björn Borg:
http://www.atpworldtour.com/Tennis/Players/B058.aspx
Usage:
{{Association of Tennis Professionals link | B058 | Björn Borg }}
{{Association of Tennis Professionals link | id= B058 | name= Björn Borg }}
Results:
- Björn Borg at the Association of Tennis Professionals
- Björn Borg at the Association of Tennis Professionals
See also
- {{WTA}}
- {{ITF profile}}