Difference between revisions of "Template:HanCinema person/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (fix placement of category to include template, not documentation (via JWB))
imported>CherryPie94
m
Line 3: Line 3:
 
{{Uses Wikidata|P3045}}
 
{{Uses Wikidata|P3045}}
 
{{Tracks Wikidata|P3045}}
 
{{Tracks Wikidata|P3045}}
 +
 +
This template is used to generate an external link to a web page for a person in the HanCinema. It should only be used in the "external links" section of an article.
 +
 +
: ''For films/movies, use [[Template:HanCinema film|HanCinema film]].''
 +
: ''For TV series, use [[Template:HanCinema drama|HanCinema drama]].''
  
 
== Usage ==
 
== Usage ==
 
 
=== No parameters ===  
 
=== No parameters ===  
 
* {{tlc|{{BASEPAGENAME}}}} and the template will pull the ID from [[Wikidata]] (if present there) and extract the link text from the page name, minus an parenthetical disambiguation.  
 
* {{tlc|{{BASEPAGENAME}}}} and the template will pull the ID from [[Wikidata]] (if present there) and extract the link text from the page name, minus an parenthetical disambiguation.  
  
 
=== With parameters ===
 
=== With parameters ===
* {{tlc|{{BASEPAGENAME}}|2=<var>id</var>|3=<var>name</var>}}
+
* The template then uses the article title as the [[anchor text]]:
* {{tlc|{{BASEPAGENAME}}|2=id=<var>id</var>|3=name=<var>name</var>}}
+
<pre>
 +
* {{HanCinema person | ID }}
 +
* {{HanCinema person | id= ID }}
 +
</pre>
 +
 
 +
* To have the link text be other than the article title, use second parameter:
 +
<pre>
 +
* {{HanCinema person | ID | Name }}
 +
* {{HanCinema person | id= ID | name= Name }}
 +
</pre>
 +
 
 +
==TemplateData==
 +
{{TemplateData header}}
 +
<templatedata>
 +
{
 +
"description": "This template is used to generate an external link to a web page for a person in the HanCinema Database.",
 +
"params": {
 +
"id": {
 +
"label": "ID",
 +
"aliases": [ "1" ],
 +
"description": "The HanCinema person ID for the target page.",
 +
"type": "number",
 +
"required": true
 +
},
 +
"name": {
 +
"label": "Name",
 +
"aliases": ["2"],
 +
"description": "Name that you want to have displayed. Defaults to article title.",
 +
"type": "string",
 +
"required": false
 +
                }
 +
}
 +
}
 +
</templatedata>
  
 
==Tracking categories==
 
==Tracking categories==
Line 18: Line 55:
 
* {{clc|HanCinema person ID same as Wikidata}}
 
* {{clc|HanCinema person ID same as Wikidata}}
 
* {{cl|Hancinema person template with no id set}} (exists in template, not created)
 
* {{cl|Hancinema person template with no id set}} (exists in template, not created)
 
== See also ==
 
* {{tl|HanCinema film}}
 
* {{tl|HanCinema drama}}
 
  
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||

Revision as of 09:32, 14 April 2018

Template:Uses Wikidata Template:Tracks Wikidata

This template is used to generate an external link to a web page for a person in the HanCinema. It should only be used in the "external links" section of an article.

For films/movies, use HanCinema film.
For TV series, use HanCinema drama.

Usage

No parameters

  • {{HanCinema person}} and the template will pull the ID from Wikidata (if present there) and extract the link text from the page name, minus an parenthetical disambiguation.

With parameters

  • The template then uses the article title as the anchor text:
* {{HanCinema person | ID }}
* {{HanCinema person | id= ID }}
  • To have the link text be other than the article title, use second parameter:
* {{HanCinema person | ID | Name }}
* {{HanCinema person | id= ID | name= Name }}

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 HanCinema person

This template is used to generate an external link to a web page for a person in the HanCinema Database.

Template parameters

ParameterDescriptionTypeStatus
IDid 1

The HanCinema person ID for the target page.

Numberrequired
Namename 2

Name that you want to have displayed. Defaults to article title.

Stringoptional

Tracking categories