قالب:ATP
{{{name}}} at the Association of Tennis Professionals
| Uses Lua: |
| This template is used on many pages, so changes to it will be widely noticed. Please test any changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Please consider discussing changes on the talk page قبل تنفيذهم. |
قالب: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.
Usage
Omit the ID to use the Wikidata property.
- Article name as link text
{{ATP | ID }}{{ATP | id= ID }}
- Parameter as link text
{{ATP | ID | NAME }}{{ATP | id= ID | name= NAME }}
Examples
ID in template
- Usage in the article Andre Agassi, with article name as link text
* {{ATP | a092 }}* {{ATP | id= A092 }}
- Usage with name parameter as link text
* {{ATP | a092 | Andre Agassi }}* {{ATP | id= A092 | name= Andre Agassi }}
- Output
- Current URLs
- https://www.atptour.com/en/players/andre-agassi/a092/overview
- https://www.atptour.com/en/players/Andre-Agassi/A092/overview
- https://www.atptour.com/en/players/-/a092/overview
- https://www.atptour.com/en/players/-/A092/overview
- Former URLs
- https://www.atpworldtour.com/en/players/andre-agassi/a092/overview
- https://www.atpworldtour.com/en/players/-/a092/overview
- 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
* {{ATP}}* {{ATP | name= Björn Borg }}
- Output
- Current URLs
- https://www.atptour.com/en/players/bjorn-borg/b058/overview
- https://www.atptour.com/en/players/Bjorn-Borg/B058/overview
- https://www.atptour.com/en/players/-/b058/overview
- https://www.atptour.com/en/players/-/B058/overview
- Former URLs
- https://www.atpworldtour.com/en/players/bjorn-borg/b058/overview
- https://www.atpworldtour.com/en/players/-/b058/overview
- 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
* {{ATP}}
- Output
-
- {{ATP}} template missing ID and not present in Wikidata.
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
See the monthly error report for this template.
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.
| وسيط | وصف | نوع | حالة | |
|---|---|---|---|---|
| ID | id 1 | The ID portion of the URL, which is not case-sensitive. It starts with the first letter of the player's surname and ends with three characters which may be letters or numbers. Examples: a092 or A092 for https://www.atptour.com/en/players/andre-agassi/a092/overview, mc10 or MC10 for https://www.atptour.com/en/players/andy-murray/mc10/overview, and p0dt or P0DT for https://www.atptour.com/en/players/frithjof-prydz/p0dt/overview.
| نص | اختياري |
| Name | name 2 | 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)".
| نص | اختياري |
Tracking categories
- template with ID
- Category:ATP template with ID different from Wikidata (0) – comparison is case insensitive, so a092 matches A092
- Category:ATP template with ID not in Wikidata (3)
- template missing ID
Templates and modules used
- {{PAGENAMEBASE}} and {{First word}}, implemented with Module:String
- {{EditAtWikidata}}, implemented with Module:EditAtWikidata
- {{WikidataCheck}}, implemented with Module:WikidataCheck
See also
- {{WTA}} – external link to player page at the Women's Tennis Association
- {{ITF}} – external link to player page at the International Tennis Federation
- {{Davis Cup}} – external link to player page at the Davis Cup (men)
- {{Billie Jean King Cup}} – external link to player page at the Billie Jean King Cup (women)
External links
| The above documentation is transcluded from قالب:ATP/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |