Difference between revisions of "Template:DOSB profile/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (→‎External links: update link)
imported>Zyxw
(update parameters)
Line 10: Line 10:
  
 
== Usage ==
 
== Usage ==
 +
; Unnamed parameters
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
 +
 +
; Named parameters
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 +
 
; Using [[Wikidata]] property {{Property|4053|id=only}}
 
; Using [[Wikidata]] property {{Property|4053|id=only}}
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code>
 
; New ID
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | new_id= ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | new_id= ''ID'' | name= ''NAME'' }}</code>
 
 
; Former ID
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 
  
 
== Examples ==
 
== Examples ==
  
=== New ID ===
+
=== Unnamed parameters ===
 
; Usage
 
; Usage
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | new_id= szaundra-diedrich | name= Szaundra Diedrich }}</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | szaundra-diedrich | Szaundra Diedrich }}</code>
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | new_id= julian-weber | name= Julian Weber }}</code>
 
 
   
 
   
 
; Output
 
; Output
:* {{{{BASEPAGENAME}} | new_id= szaundra-diedrich | name= Szaundra Diedrich }}
+
:* {{{{BASEPAGENAME}} | szaundra-diedrich | Szaundra Diedrich }}
:* {{{{BASEPAGENAME}} | new_id= julian-weber | name= Julian Weber }}
 
  
; URLs
+
; Current URL
 
: <kbd>[https://www.teamdeutschland.de/athleten/details/szaundra-diedrich https://www.teamdeutschland.de/athleten/details/{{Hilite|szaundra-diedrich}}]</kbd>
 
: <kbd>[https://www.teamdeutschland.de/athleten/details/szaundra-diedrich https://www.teamdeutschland.de/athleten/details/{{Hilite|szaundra-diedrich}}]</kbd>
: <kbd>[https://www.teamdeutschland.de/athleten/details/julian-weber https://www.teamdeutschland.de/athleten/details/{{Hilite|julian-weber}}]</kbd>
 
  
=== Former ID ===
+
; Former URLs
 +
: <kbd>[https://www.teamdeutschland.de/de/athleten/detail/a_action/show/a_athletes/szaundra-diedrich-870.html https://www.teamdeutschland.de/de/athleten/detail/a_action/show/a_athletes/{{Hilite|szaundra-diedrich-870}}.html]</kbd>
 +
: <kbd>[http://www.deutsche-olympiamannschaft.de/de/athleten/detail/a_action/show/a_athletes/szaundra-diedrich-870.html http://www.deutsche-olympiamannschaft.de/de/athleten/detail/a_action/show/a_athletes/{{Hilite|szaundra-diedrich-870}}.html]</kbd>
 +
 
 +
=== Named parameters ===
 
; Usage
 
; Usage
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= szaundra-diedrich-870 | name= Szaundra Diedrich }}</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= julian-weber | name= Julian Weber }}</code>
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= julian-weber-2008 | name= Julian Weber }}</code>
 
  
 
; Output
 
; Output
:* {{{{BASEPAGENAME}} | id= szaundra-diedrich-870 | name= Szaundra Diedrich }}
+
:* {{{{BASEPAGENAME}} | id= julian-weber | name= Julian Weber }}
:* {{{{BASEPAGENAME}} | id= julian-weber-2008 | name= Julian Weber }}
+
 
 +
; Current URL
 +
: <kbd>[https://www.teamdeutschland.de/athleten/details/julian-weber https://www.teamdeutschland.de/athleten/details/{{Hilite|julian-weber}}]</kbd>
  
; URLs
+
; Former URLs
: <kbd>[https://www.teamdeutschland.de/de/athleten/detail/a_action/show/a_athletes/szaundra-diedrich-870.html https://www.teamdeutschland.de/de/athleten/detail/a_action/show/a_athletes/{{Hilite|szaundra-diedrich-870}}.html]</kbd>
 
 
: <kbd>[https://www.teamdeutschland.de/de/athleten/detail/a_action/show/a_athletes/julian-weber-2008.html https://www.teamdeutschland.de/de/athleten/detail/a_action/show/a_athletes/{{Hilite|julian-weber-2008}}.html]</kbd>
 
: <kbd>[https://www.teamdeutschland.de/de/athleten/detail/a_action/show/a_athletes/julian-weber-2008.html https://www.teamdeutschland.de/de/athleten/detail/a_action/show/a_athletes/{{Hilite|julian-weber-2008}}.html]</kbd>
 
; URLs (deutsche-olympiamannschaft.de)
 
: <kbd>[http://www.deutsche-olympiamannschaft.de/de/athleten/detail/a_action/show/a_athletes/szaundra-diedrich-870.html http://www.deutsche-olympiamannschaft.de/de/athleten/detail/a_action/show/a_athletes/{{Hilite|szaundra-diedrich-870}}.html]</kbd>
 
 
: <kbd>[http://www.deutsche-olympiamannschaft.de/de/athleten/detail/a_action/show/a_athletes/julian-weber-2008.html http://www.deutsche-olympiamannschaft.de/de/athleten/detail/a_action/show/a_athletes/{{Hilite|julian-weber-2008}}.html]</kbd>
 
: <kbd>[http://www.deutsche-olympiamannschaft.de/de/athleten/detail/a_action/show/a_athletes/julian-weber-2008.html http://www.deutsche-olympiamannschaft.de/de/athleten/detail/a_action/show/a_athletes/{{Hilite|julian-weber-2008}}.html]</kbd>
  
Line 69: Line 65:
 
   "description": "This template displays an external link to an athlete's profile at TeamDeutschland.de, an official website of the German Olympic Sports Confederation (DOSB: Deutscher Olympischer Sportbund). It is intended for use in the external links section of an article.",
 
   "description": "This template displays an external link to an athlete's profile at TeamDeutschland.de, an official website of the German Olympic Sports Confederation (DOSB: Deutscher Olympischer Sportbund). It is intended for use in the external links section of an article.",
 
   "params": {
 
   "params": {
     "new_id": {
+
     "id": {
       "label": "new_id",
+
       "label": "id",
       "description": "The \"new_id\" parameter should contain the ID portion of the new URL. Example: szaundra-diedrich is the ID portion of https://www.teamdeutschland.de/athleten/details/szaundra-diedrich. This parameter is optional if Wikidata property P4053 exists, but required if not.",
+
      "aliases": ["1","new_id"],  
 +
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the current URL. Example: szaundra-diedrich is the ID portion of https://www.teamdeutschland.de/athleten/details/szaundra-diedrich. This parameter is optional if Wikidata property P4053 exists, but required if not.",
 
       "type": "string",
 
       "type": "string",
 
       "required": false,
 
       "required": false,
 
       "default": "Wikidata property P4053"
 
       "default": "Wikidata property P4053"
    },
 
    "id": {
 
      "label": "id",
 
      "aliases": ["1"],
 
      "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the former URL. Example: szaundra-diedrich-870 is the ID portion of https://www.teamdeutschland.de/de/athleten/detail/a_action/show/a_athletes/szaundra-diedrich-870.html or http://www.deutsche-olympiamannschaft.de/de/athleten/detail/a_action/show/a_athletes/szaundra-diedrich-870.html. This parameter is optional if the \"new_id\" parameter is used or Wikidata property P4053 exists, but required if not.",
 
      "type": "string",
 
      "required": false
 
 
     },
 
     },
 
     "name": {
 
     "name": {
Line 93: Line 83:
 
   },
 
   },
 
   "paramOrder": [
 
   "paramOrder": [
    "new_id",
 
 
     "id",
 
     "id",
 
     "name"
 
     "name"
Line 104: Line 93:
 
* {{clc|DOSB profile ID different from Wikidata}}
 
* {{clc|DOSB profile ID different from Wikidata}}
 
* {{clc|DOSB profile ID not in Wikidata}}
 
* {{clc|DOSB profile ID not in Wikidata}}
<!-- not currently used: * {{clc|DOSB profile ID same as Wikidata}} -->
 
 
; ID parameter does not exist
 
; ID parameter does not exist
 
* {{clc|DOSB profile template missing ID and not in Wikidata}}
 
* {{clc|DOSB profile template missing ID and not in Wikidata}}

Revision as of 21:00, 1 August 2020

Template:Template redirect

Template:Uses Wikidata Template:Tracks Wikidata

Template:DOSB profile displays an external link to an athlete's profile at TeamDeutschland.de, an official website of the German Olympic Sports Confederation (DOSB: Deutscher Olympischer Sportbund). It is intended for use in the external links section of an article.

Usage

Unnamed parameters
{{DOSB profile | ID }}
{{DOSB profile | ID | NAME }}
Named parameters
{{DOSB profile | id= ID }}
{{DOSB profile | id= ID | name= NAME }}
Using Wikidata property Template:Property
{{DOSB profile}}
{{DOSB profile | name= NAME }}

Examples

Unnamed parameters

Usage
* {{DOSB profile | szaundra-diedrich | Szaundra Diedrich }}
Output
Current URL
https://www.teamdeutschland.de/athleten/details/szaundra-diedrich
Former URLs
https://www.teamdeutschland.de/de/athleten/detail/a_action/show/a_athletes/szaundra-diedrich-870.html
http://www.deutsche-olympiamannschaft.de/de/athleten/detail/a_action/show/a_athletes/szaundra-diedrich-870.html

Named parameters

Usage
* {{DOSB profile | id= julian-weber | name= Julian Weber }}
Output
Current URL
https://www.teamdeutschland.de/athleten/details/julian-weber
Former URLs
https://www.teamdeutschland.de/de/athleten/detail/a_action/show/a_athletes/julian-weber-2008.html
http://www.deutsche-olympiamannschaft.de/de/athleten/detail/a_action/show/a_athletes/julian-weber-2008.html

No parameters and Wikidata property not defined

Usage
* {{DOSB profile}}
Output

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for DOSB profile

This template displays an external link to an athlete's profile at TeamDeutschland.de, an official website of the German Olympic Sports Confederation (DOSB: Deutscher Olympischer Sportbund). It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
idid 1 new_id

The "id" parameter (or unnamed parameter "1") should contain the ID portion of the current URL. Example: szaundra-diedrich is the ID portion of https://www.teamdeutschland.de/athleten/details/szaundra-diedrich. This parameter is optional if Wikidata property P4053 exists, but required if not.

Default
Wikidata property P4053
Stringoptional
namename 2

The "name" parameter (or unnamed parameter "2") may be used to specify the link text, which should be the name of the athlete. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(athlete)".

Default
{{PAGENAMEBASE}}
Stringoptional

Tracking categories

ID parameter exists
ID parameter does not exist

Templates and modules used

See also

External links