Difference between revisions of "Template:ForaDeJogo manager/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(documentation and categories moved from main template)
 
imported>Zyxw
(update documentation and examples, add TemplateData, note use of Wikidata property P3661 if no "id".)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 +
{{Uses Wikidata|P3661}}
 +
{{Lua|Module:EditAtWikidata}}
 +
 +
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[association football]] ([[soccer]]) coach or manager's profile at [https://www.foradejogo.net/ ForaDeJogo.net].
  
 
== Usage ==
 
== Usage ==
<code><nowiki>{{ForaDeJogo manager|id}}</nowiki></code>
+
Unnamed parameters:
* e.g. <code><nowiki>{{ForaDeJogo manager|211}}</nowiki></code> or <code><nowiki>{{ForaDeJogo manager|211|Toni}}</nowiki></code>
+
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> }}
 +
: {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>NAME</var> }}
 +
 
 +
Named parameters:
 +
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> }}
 +
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> }}
 +
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> | accessdate{{=}} <var>ACCESS DATE</var> }}
 +
 
 +
Using [[Wikidata]] property [[d:Property:P3661|P3661]]:
 +
: {{tlcw|{{BASEPAGENAME}}}}
 +
: {{tlcw|{{BASEPAGENAME}} | name{{=}} <var>NAME</var> }}
 +
: {{tlcw|{{BASEPAGENAME}} | name{{=}} <var>NAME</var> | accessdate{{=}} <var>ACCESS DATE</var> }}
 +
 
 +
== Examples ==
 +
 
 +
=== Unnamed parameters ===
 +
''URL:''
 +
: <tt>[https://www.foradejogo.net/manager.php?manager=211&language=2 https://www.foradejogo.net/manager.php?manager={{Hilite|211}}&language=2]</tt>
 +
''Usage:''
 +
: {{tlcw|{{BASEPAGENAME}} | 211 | Toni }}
 +
''Output:''
 +
: {{{{BASEPAGENAME}} | 211 | Toni }}
 +
 
 +
=== Named parameters ===
 +
''URL:''
 +
: <tt>[https://www.foradejogo.net/manager.php?manager=10439&language=2 https://www.foradejogo.net/manager.php?manager={{Hilite|10439}}&language=2]</tt>
 +
''Usage:''
 +
: {{tlcw|{{BASEPAGENAME}} | id{{=}} 10439 | name{{=}} Daniel Kenedy | accessdate{{=}} {{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}
 +
''Output:''
 +
: {{{{BASEPAGENAME}} | id= 10439 | name= Daniel Kenedy | accessdate= {{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}
 +
 
 +
=== No parameters and Wikidata property not defined ===
 +
''Usage:''
 +
: {{tlcw|{{BASEPAGENAME}}}}
 +
''Output:''
 +
: {{{{BASEPAGENAME}}<!-- -->}}
  
The parameter {{para|accessdate}} should be added when template is used as a reference rather than as an external link.
+
== TemplateData ==
* e.g. <code><nowiki>{{ForaDeJogo manager|211|accessdate=</nowiki>{{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}<nowiki>}}</nowiki><code> or <code><nowiki>{{ForaDeJogo manager|211|Toni|accessdate=</nowiki>{{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}<nowiki>}}</nowiki><code>
+
{{TemplateData header}}
 +
<templatedata>
 +
{
 +
  "description": "This template displays an external link to an association football (soccer) coach or manager's profile at ForaDeJogo.net.",
 +
  "params": {
 +
    "id": {
 +
      "label": "id",
 +
      "aliases": ["1"],
 +
      "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 10439 is the ID portion of https://www.foradejogo.net/manager.php?manager=10439&language=2.  This parameter is optional if Wikidata property P3661 exists, but required if not.",
 +
      "type": "number",
 +
      "required": false,
 +
      "default": "Wikidata property P3661"
 +
    },
 +
    "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": "accessdate",
 +
      "aliases": ["access-date"],
 +
      "description": "The \"accessdate\" or \"access-date\" parameter may be used to specify the date when the ForaDeJogo profile was last accessed. It allows the template to be used as a reference, rather than as an external link. This parameter is optional.",
 +
      "type": "date",
 +
      "required": false
 +
    }
 +
  },
 +
  "paramOrder": [
 +
    "id",
 +
    "name",
 +
    "accessdate"
 +
  ]
 +
}
 +
</templatedata>
  
 
==See also==
 
==See also==
Line 16: Line 90:
 
[[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>

Revision as of 05:40, 29 March 2017

Template:Uses Wikidata

Template:ForaDeJogo manager displays an external link to an association football (soccer) coach or manager's profile at ForaDeJogo.net.

Usage

Unnamed parameters:

Template:Tlcw
Template:Tlcw

Named parameters:

Template:Tlcw
Template:Tlcw
Template:Tlcw

Using Wikidata property P3661:

Template:Tlcw
Template:Tlcw
Template:Tlcw

Examples

Unnamed parameters

URL:

https://www.foradejogo.net/manager.php?manager=211&language=2

Usage:

Template:Tlcw

Output:

Toni manager stats at ForaDeJogoScript error: No such module "EditAtWikidata".

Named parameters

URL:

https://www.foradejogo.net/manager.php?manager=10439&language=2

Usage:

Template:Tlcw

Output:

Daniel Kenedy manager stats at ForaDeJogo. Retrieved 20 August 2026.Script error: No such module "EditAtWikidata".

No parameters and Wikidata property not defined

Usage:

Template:Tlcw

Output:

Template:PAGENAMEBASE manager stats at ForaDeJogoScript error: No such module "EditAtWikidata".

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 ForaDeJogo manager

This template displays an external link to an association football (soccer) coach or manager's profile at ForaDeJogo.net.

Template parameters

ParameterDescriptionTypeStatus
idid 1

The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: 10439 is the ID portion of https://www.foradejogo.net/manager.php?manager=10439&language=2. This parameter is optional if Wikidata property P3661 exists, but required if not.

Default
Wikidata property P3661
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
accessdateaccessdate access-date

The "accessdate" or "access-date" parameter may be used to specify the date when the ForaDeJogo profile was last accessed. It allows the template to be used as a reference, rather than as an external link. This parameter is optional.

Dateoptional

See also