Template:ATP/sandbox
{{{name}}} at the Association of Tennis ProfessionalsTemplate:WikidataCheck
This is the template sandbox page for Template:ATP (diff). See also the companion subpage for test cases. |
Template:Uses Wikidata Template:Tracks Wikidata
This template uses Lua: |
Template:ATP displays an external link to a tennis player's profile at ATPtour.com (formerly ATPworldtour.com), the official website of the Association of Tennis Professionals (ATP). It is intended for use in the external links section of an article.
Contents
Usage
Unnamed parameters:
Named parameters:
Examples
ID in template
Usage in the article Andre Agassi, with article name as link text:
Usage with name parameter as link text:
Output:
- Andre Agassi at the Association of Tennis ProfessionalsScript error: No such module "EditAtWikidata".Template:WikidataCheck
Current URLs:
- https://www.atptour.com/en/players/andre-agassi/a092/overview
- https://www.atpworldtour.com/en/players/andre-agassi/a092/overview (redirects to above)
- https://www.atptour.com/en/players/-/a092/overview
- https://www.atpworldtour.com/en/players/-/a092/overview (redirects to above)
Former URLs:
- https://www.atpworldtour.com/Tennis/Players/A092.aspx
- https://www.atpworldtour.com/Tennis/Players/A092
- https://www.atpworldtour.com/Tennis/Players/Ag/A/Andre-Agassi.aspx (archive)
- https://www.atpworldtour.com/Tennis/Players/Ag/A/Andre-Agassi
ID in Wikidata
Usage in the article Björn Borg:
Output:
- Björn Borg at the Association of Tennis ProfessionalsScript error: No such module "EditAtWikidata".Template:WikidataCheck
Current URLs:
- https://www.atptour.com/en/players/bjorn-borg/b058/overview
- https://www.atpworldtour.com/en/players/bjorn-borg/b058/overview (redirects to above)
- https://www.atptour.com/en/players/-/b058/overview
- https://www.atpworldtour.com/en/players/-/b058/overview (redirects to above)
Former URLs:
- https://www.atpworldtour.com/Tennis/Players/B058.aspx
- https://www.atpworldtour.com/Tennis/Players/B058
- https://www.atpworldtour.com/Tennis/Players/Bj/B/Bjorn-Borg.aspx
- https://www.atpworldtour.com/Tennis/Players/Bj/B/Bjorn-Borg
No ID in template or Wikidata
Usage:
Output:
- Template:PAGENAMEBASE at the Association of Tennis ProfessionalsScript error: No such module "EditAtWikidata".Template:WikidataCheck
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.
TemplateData
TemplateData for ATP
This template displays an external link to a tennis player's profile at ATPtour.com (formerly ATPworldtour.com), the official website of the Association of Tennis Professionals (ATP). 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: a092 is the in https://www.atptour.com/en/players/andre-agassi/a092/overview or https://www.atpworldtour.com/en/players/andre-agassi/a092/overview.
| String | 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 tennis player. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(tennis)".
| String | optional |
Tracking categories
- template with ID
- Category:ATP template with ID different from Wikidata (0)
- Category:ATP template with ID not in Wikidata (0)
- template missing ID
Templates and modules used
- Template:First word, implemented with Module:String
- Module:EditAtWikidata
- Module:WikidataCheck
See also
- {{WTA}}
- {{ITF profile}}
- {{Davis Cup player}}
- {{Fed Cup player}}
The above documentation is transcluded from Template:ATP/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |