Difference between revisions of "Template:Futbolme/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (note Wikidata property, update examples)
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|P7399}}
+
{{Uses Wikidata|P7399}}
 +
{{Lua|Module:EditAtWikidata}}
  
 
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[association football]] ([[soccer]]) player's profile at [http://www.futbolme.com/ Futbolme.com].  It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
 
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[association football]] ([[soccer]]) player's profile at [http://www.futbolme.com/ Futbolme.com].  It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
Line 13: Line 14:
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 +
 +
; Using [[Wikidata]] property [[d:Property:P7399|P7399]]
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code>
  
 
== Examples ==
 
== Examples ==
Line 38: Line 43:
 
: <kbd>[https://futbolme.com/resultados-directo/jugador/roldan/15301 https://futbolme.com/resultados-directo/jugador/roldan/{{Hilite|15301}}]</kbd>
 
: <kbd>[https://futbolme.com/resultados-directo/jugador/roldan/15301 https://futbolme.com/resultados-directo/jugador/roldan/{{Hilite|15301}}]</kbd>
  
=== No parameters ===
+
=== No parameters and Wikidata property not defined ===
 
; Usage
 
; Usage
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}}}</code>
 
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}}}</code>
Line 54: Line 59:
 
       "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: 14664 is the ID portion of https://futbolme.com/jugador.php?id=14664 or https://futbolme.com/resultados-directo/jugador/dani-gail/14664.",
+
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 14664 is the ID portion of https://futbolme.com/jugador.php?id=14664 or https://futbolme.com/resultados-directo/jugador/dani-gail/14664. This parameter is optional if Wikidata property P7399 exists, but required if not.",
 
       "type": "number",
 
       "type": "number",
       "required": true
+
       "required": false,
 +
      "default": "Wikidata property P7399"
 
     },
 
     },
 
     "name": {
 
     "name": {
Line 83: Line 89:
 
[[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]]
 +
[[Category:External link templates using Wikidata]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 15:16, 29 March 2020

Template:Uses Wikidata

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

Usage

Unnamed parameters
{{Futbolme | ID }}
{{Futbolme | ID | NAME }}
Named parameters
{{Futbolme | id= ID }}
{{Futbolme | id= ID | name= NAME }}
Using Wikidata property P7399
{{Futbolme}}
{{Futbolme | name= NAME }}

Examples

Unnamed parameters

Usage
* {{Futbolme | 14664 | Dani Gail (Daniel Gail Bricios) }}
Output
URLs
https://futbolme.com/jugador.php?id=14664
https://futbolme.com/resultados-directo/jugador/dani-gail/14664

Named parameters

Usage
* {{Futbolme | id= 15301 | name= Roldán (Antonio Gómez Roldán) }}
Output
URLs
https://futbolme.com/jugador.php?id=15301
https://futbolme.com/resultados-directo/jugador/roldan/15301

No parameters and Wikidata property not defined

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

This template displays an external link to an association football (soccer) player's profile at Futbolme.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: 14664 is the ID portion of https://futbolme.com/jugador.php?id=14664 or https://futbolme.com/resultados-directo/jugador/dani-gail/14664. This parameter is optional if Wikidata property P7399 exists, but required if not.

Default
Wikidata property P7399
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

See also