Difference between revisions of "Template:LaPreferente/doc"

From blackwiki
Jump to navigation Jump to search
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 property|P7359}}
+
{{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. It is intended for use in the external links section of an article.",
+
   "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": true
+
       "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

Template:Uses Wikidata

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 }}
Using Wikidata property P7359
{{LaPreferente}}
{{LaPreferente | name= NAME }}

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

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.

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. This parameter is optional if Wikidata property P7359 exists, but required if not.

Default
Wikidata property P7359
Numberoptional
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