Difference between revisions of "Template:HanCinema person/doc"
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 === | ||
− | * {{ | + | * The template then uses the article title as the [[anchor text]]: |
− | * {{ | + | <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) | ||
− | |||
− | |||
− | |||
− | |||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| |
Revision as of 09:32, 14 April 2018
![]() | This is a documentation subpage for Template:HanCinema person. It contains usage information, categories and other content that is not part of the original template page. |
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
ID | id 1 | The HanCinema person ID for the target page. | Number | required |
Name | name 2 | Name that you want to have displayed. Defaults to article title. | String | optional |
Tracking categories
- Category:HanCinema person ID not in Wikidata (0)
- Category:HanCinema person ID different from Wikidata (0)
- Category:HanCinema person ID same as Wikidata (0)
- Category:Hancinema person template with no id set (exists in template, not created)