Difference between revisions of "Template:LaPreferente/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jonesey95
m (Fix Linter errors using AutoEd)
imported>Zyxw
(note Wikidata property, update examples and URLs, add TemplateData, add category)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 +
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
 +
{{Wikidata property|P7359}}
  
==Usage==
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[association football]] ([[soccer]]) player's profile at [https://www.lapreferente.com LaPreferente.com].
<code><nowiki>{{LaPreferente|id}}</nowiki></code>
 
:Where '''id''' is the number of the page.
 
  
<code><nowiki>{{LaPreferente|id|name}}</nowiki></code>
+
== Usage ==
:Where '''id''' is the number of the page (without the "J") and '''name''' is a variant display (different to the article's name).
+
; 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>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | accessdate= ''DATE'' }}</code>
  
 
==Examples==
 
==Examples==
  
 
=== Unnamed parameters ===
 
=== Unnamed parameters ===
''URLs:''
+
; Usage
* <code>[http://www.lapreferente.net/index.php?IDjugador=112727 http://www.lapreferente.net/index.php?IDjugador={{hilite|112727}}]</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 112727 | Cristian Salvador }}</code>
* <code>[http://www.lapreferente.net/J112727/.html http://www.lapreferente.net/J{{hilite|112727/}}.html]</code>
+
 
* <code>[http://www.lapreferente.net/J112727/cristian.html http://www.lapreferente.net/J{{hilite|112727/cristian}}.html]</code>
+
; Output
* <code>[http://www.lapreferente.net/J112727/real-sporting-b/cristian.html http://www.lapreferente.net/J{{hilite|112727/real-sporting-b/cristian}}.html]</code>
+
:* {{{{BASEPAGENAME}} | 112727 | Cristian Salvador }}
 +
 
 +
; Current URLs
 +
: [https://www.lapreferente.com/index.php?IDjugador=112727 https://www.lapreferente.com/index.php?IDjugador={{hilite|112727}}]
 +
: [https://www.lapreferente.com/J112727/.html https://www.lapreferente.com/J{{hilite|112727}}/.html]
 +
: [https://www.lapreferente.com/J112727/cristian.html https://www.lapreferente.com/J{{hilite|112727}}/cristian.html]
 +
: [https://www.lapreferente.com/J112727/real-sporting-b/cristian.html https://www.lapreferente.com/J{{hilite|112727}}/real-sporting-b/cristian.html]
  
''Usage and output:''
+
; Former URLs
* <code><nowiki>{{LaPreferente | 112727 | Cristian (Cristian Salvador González) }}</nowiki></code>
+
: <nowiki>http://</nowiki>www.lapreferente.net/index.php?IDjugador={{hilite|112727}}
*: {{LaPreferente | 112727 | Cristian (Cristian Salvador González) }}
+
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|112727}}/.html
* <code><nowiki>{{LaPreferente | 112727/ | Cristian (Cristian Salvador González) }}</nowiki></code>
+
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|112727}}/cristian.html ([https://web.archive.org/web/20170108191610/http://www.lapreferente.net/J112727/cristian.html archive])
*: {{LaPreferente | 112727/ | Cristian (Cristian Salvador González) }}
+
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|112727}}/real-sporting-b/cristian.html ([https://web.archive.org/web/20170210135710/http://www.lapreferente.net/J112727/real-sporting-b/cristian.html archive])
* <code><nowiki>{{LaPreferente | 112727/cristian | Cristian (Cristian Salvador González) }}</nowiki></code>
 
*: {{LaPreferente | 112727/cristian | Cristian (Cristian Salvador González) }}
 
* <code><nowiki>{{LaPreferente | 112727/real-sporting-b/cristian | Cristian (Cristian Salvador González) }}</nowiki></code>
 
*: {{LaPreferente | 112727/real-sporting-b/cristian | Cristian (Cristian Salvador González) }}
 
  
 
=== Named parameters ===
 
=== Named parameters ===
''URLs:''
+
; Usage
* <code>[http://www.lapreferente.net/index.php?IDjugador=211345 http://www.lapreferente.net/index.php?IDjugador={{hilite|211345}}]</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 211345 | name= Juan Moreno | accessdate= {{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}</code>
* <code>[http://www.lapreferente.net/J211345/.html http://www.lapreferente.net/J{{hilite|211345/}}.html]</code>
+
 
* <code>[http://www.lapreferente.net/J211345/juan-moreno.html http://www.lapreferente.net/J{{hilite|211345/juan-moreno}}.html]</code>
+
; Output
* <code>[http://www.lapreferente.net/J211345C6792/atletico-de-madrid/juan-moreno.html http://www.lapreferente.net/J{{hilite|211345C6792/atletico-de-madrid/juan-moreno}}.html]</code>
+
: {{{{BASEPAGENAME}} | id= 211345 | name= Juan Moreno | accessdate= {{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}
 +
 
 +
; Current URLs
 +
: [https://www.lapreferente.com/index.php?IDjugador=211345 https://www.lapreferente.com/index.php?IDjugador={{hilite|211345}}]
 +
: [https://www.lapreferente.com/J211345/.html https://www.lapreferente.com/J{{hilite|211345}}/.html]
 +
: [https://www.lapreferente.com/J211345/juan-moreno.html https://www.lapreferente.com/J{{hilite|211345}}/juan-moreno.html]
 +
: [https://www.lapreferente.com/J211345C6792/atletico-de-madrid/juan-moreno.html https://www.lapreferente.com/J{{hilite|211345}}C6792/atletico-de-madrid/juan-moreno.html]
 +
 
 +
; Former URLs
 +
: <nowiki>http://</nowiki>www.lapreferente.net/index.php?IDjugador={{hilite|211345}}
 +
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|211345}}/.html
 +
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|211345}}/juan-moreno.html
 +
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|211345}}C6792/atletico-de-madrid/juan-moreno.html
 +
 
 +
=== No parameters ===
 +
; Usage
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}}}</code>
 +
 
 +
; Output
 +
:* {{ {{BASEPAGENAME}} }}
  
''Usage and output:''
+
== TemplateData ==
* <code><nowiki>{{LaPreferente |id= 211345 |name= Juan Moreno (Juan Moreno Fernández) |accessdate=</nowiki>{{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}<nowiki> }}</nowiki></code>
+
{{TemplateData header}}
*: {{LaPreferente |id= 211345 |name= Juan Moreno (Juan Moreno Fernández)|accessdate={{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}
+
<templatedata>
* <code><nowiki>{{LaPreferente |id= 211345/ |name= Juan Moreno (Juan Moreno Fernández) |accessdate=</nowiki>{{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}<nowiki> }}</nowiki></code>
+
{
*: {{LaPreferente |id= 211345/ |name= Juan Moreno (Juan Moreno Fernández|accessdate={{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}) }}
+
  "description": "This template displays an external link to an association football (soccer) player's profile at LaPreferente.com. It is intended for use in the external links section of an article.",
* <code><nowiki>{{LaPreferente |id= 211345/juan-moreno |name= Juan Moreno (Juan Moreno Fernández) |accessdate=</nowiki>{{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}<nowiki> }}</nowiki></code>
+
  "params": {
*: {{LaPreferente |id= 211345/juan-moreno |name= Juan Moreno (Juan Moreno Fernández)|accessdate={{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}
+
    "id": {
* <code><nowiki>{{LaPreferente |id= 211345C6792/atletico-de-madrid/juan-moreno |name= Juan Moreno (Juan Moreno Fernández) |accessdate=</nowiki>{{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}<nowiki> }}</nowiki></code>
+
      "label": "ID",
*: {{LaPreferente |id= 211345C6792/atletico-de-madrid/juan-moreno |name= Juan Moreno (Juan Moreno Fernández)|accessdate={{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}
+
      "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.",
 +
      "type": "number",
 +
      "required": true
 +
    },
 +
    "name": {
 +
      "label": "Name",
 +
      "aliases": ["2"],
 +
      "description": "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)\".",
 +
      "type": "string",
 +
      "required": false,
 +
      "default": "{{PAGENAMEBASE}}"
 +
    },
 +
    "accessdate": {
 +
      "label": "Access Date",
 +
      "description": "The \"accessdate\" parameter may be used to specify the date when the URL was last accessed. This parameter is optional.",
 +
      "type": "date",
 +
      "required": false
 +
    }
 +
  },
 +
  "paramOrder": [
 +
    "id",
 +
    "name",
 +
    "accessdate"
 +
  ]
 +
}
 +
</templatedata>
  
==See also==
+
== See also ==
 
* [[Template:BDFutbol]]
 
* [[Template:BDFutbol]]
 
* [[Template:BDFutbol manager]]
 
* [[Template:BDFutbol manager]]
 
* [[Template:Futbolme]]
 
* [[Template:Futbolme]]
  
<includeonly>
+
<includeonly>{{Sandbox other||
 +
<!-- Categories below this line; interwikis at Wikidata -->
 
[[Category:Association football external link templates]]
 
[[Category:Association football external link templates]]
 
[[Category:People and person external link templates]]
 
[[Category:People and person external link templates]]
</includeonly>
+
[[Category:External link templates with accessdate parameter]]
 +
}}</includeonly>

Revision as of 07:45, 24 March 2020

Template:Wikidata property

Template:LaPreferente displays an external link to an association football (soccer) player's profile at LaPreferente.com.

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

Usage
* {{LaPreferente}}
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 LaPreferente

This template displays an external link to an association football (soccer) player's profile at LaPreferente.com. It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
IDid 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.

Numberrequired
Namename 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)".

Default
{{PAGENAMEBASE}}
Stringoptional
Access Dateaccessdate

The "accessdate" parameter may be used to specify the date when the URL was last accessed. This parameter is optional.

Dateoptional

See also