Difference between revisions of "Template:LaPreferente/doc"
imported>Zyxw (note Wikidata property, update examples and URLs, add TemplateData, add category) |
imported>Zyxw (updates for use of Wikidata) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata --> | <!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata --> | ||
| − | {{Wikidata | + | {{Uses Wikidata|P7359}} |
| + | {{Lua|Module:EditAtWikidata}} | ||
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[association football]] ([[soccer]]) player's profile at [https://www.lapreferente.com LaPreferente.com]. | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[association football]] ([[soccer]]) player's profile at [https://www.lapreferente.com LaPreferente.com]. | ||
| Line 14: | Line 15: | ||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code> | ||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | accessdate= ''DATE'' }}</code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | accessdate= ''DATE'' }}</code> | ||
| + | |||
| + | ; Using [[Wikidata]] property [[d:Property:P7359|P7359]] | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code> | ||
==Examples== | ==Examples== | ||
| Line 55: | Line 60: | ||
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|211345}}C6792/atletico-de-madrid/juan-moreno.html | : <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|211345}}C6792/atletico-de-madrid/juan-moreno.html | ||
| − | === No parameters === | + | === No parameters and Wikidata property not defined === |
; Usage | ; Usage | ||
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}}}</code> | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}}}</code> | ||
| Line 66: | Line 71: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
| − | "description": "This template displays an external link to an association football (soccer) player's profile at LaPreferente.com | + | "description": "This template displays an external link to an association football (soccer) player's profile at LaPreferente.com.", |
"params": { | "params": { | ||
"id": { | "id": { | ||
"label": "ID", | "label": "ID", | ||
"aliases": ["1"], | "aliases": ["1"], | ||
| − | "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 112727 is the ID portion of https://www.lapreferente.com/index.php?IDjugador=112727 or https://www.lapreferente.com/J112727/real-sporting-b/cristian.html.", | + | "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 112727 is the ID portion of https://www.lapreferente.com/index.php?IDjugador=112727 or https://www.lapreferente.com/J112727/real-sporting-b/cristian.html. This parameter is optional if Wikidata property P7359 exists, but required if not.", |
"type": "number", | "type": "number", | ||
| − | "required": | + | "required": false, |
| + | "default": "Wikidata property P7359" | ||
}, | }, | ||
"name": { | "name": { | ||
| Line 108: | Line 114: | ||
[[Category:People and person external link templates]] | [[Category:People and person external link templates]] | ||
[[Category:External link templates with accessdate parameter]] | [[Category:External link templates with accessdate parameter]] | ||
| + | [[Category:External link templates using Wikidata]] | ||
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 15:05, 29 March 2020
| 40px | This is a documentation subpage for Template:LaPreferente. It contains usage information, categories and other content that is not part of the original template page. |
| 30px | This template uses Lua: |
Template:LaPreferente displays an external link to an association football (soccer) player's profile at LaPreferente.com.
Contents
Usage
- Unnamed parameters
{{LaPreferente | ID }}{{LaPreferente | ID | NAME }}
- Named parameters
{{LaPreferente | id= ID }}{{LaPreferente | id= ID | name= NAME }}{{LaPreferente | id= ID | name= NAME | accessdate= DATE }}
Examples
Unnamed parameters
- Usage
* {{LaPreferente | 112727 | Cristian Salvador }}
- Output
-
- Cristian Salvador at LaPreferente.com (in Spanish)Script error: No such module "EditAtWikidata".
- Current URLs
- https://www.lapreferente.com/index.php?IDjugador=112727
- https://www.lapreferente.com/J112727/.html
- https://www.lapreferente.com/J112727/cristian.html
- https://www.lapreferente.com/J112727/real-sporting-b/cristian.html
- Former URLs
- http://www.lapreferente.net/index.php?IDjugador=112727
- http://www.lapreferente.net/J112727/.html
- http://www.lapreferente.net/J112727/cristian.html (archive)
- http://www.lapreferente.net/J112727/real-sporting-b/cristian.html (archive)
Named parameters
- Usage
{{LaPreferente | id= 211345 | name= Juan Moreno | accessdate= 18 August 2026 }}
- Output
- Juan Moreno at LaPreferente.com (in Spanish). Retrieved 18 August 2026.Script error: No such module "EditAtWikidata".
- Current URLs
- https://www.lapreferente.com/index.php?IDjugador=211345
- https://www.lapreferente.com/J211345/.html
- https://www.lapreferente.com/J211345/juan-moreno.html
- https://www.lapreferente.com/J211345C6792/atletico-de-madrid/juan-moreno.html
- Former URLs
- http://www.lapreferente.net/index.php?IDjugador=211345
- http://www.lapreferente.net/J211345/.html
- http://www.lapreferente.net/J211345/juan-moreno.html
- http://www.lapreferente.net/J211345C6792/atletico-de-madrid/juan-moreno.html
No parameters and Wikidata property not defined
- Usage
* {{LaPreferente}}
- Output
-
- Template:PAGENAMEBASE at LaPreferente.com (in Spanish)Script error: No such module "EditAtWikidata".
TemplateData
TemplateData for LaPreferente
This template displays an external link to an association football (soccer) player's profile at LaPreferente.com.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| ID | id 1 | The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: 112727 is the ID portion of https://www.lapreferente.com/index.php?IDjugador=112727 or https://www.lapreferente.com/J112727/real-sporting-b/cristian.html. This parameter is optional if Wikidata property P7359 exists, but required if not.
| Number | 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 player. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(footballer)" or "(soccer)".
| String | optional |
| Access Date | accessdate | The "accessdate" parameter may be used to specify the date when the URL was last accessed. This parameter is optional. | Date | optional |
See also