Template:Wikidata image/doc: Difference between revisions
meta>Zyxw update category link |
meta>Zyxw update documentation, add parameters section, add list of infoboxes currently using this template |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
{{High-risk| | <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | ||
{{High-risk|439000+}} | |||
{{Tracks Wikidata|P18|cat=No local image but image on Wikidata}} | {{Tracks Wikidata|P18|cat=No local image but image on Wikidata}} | ||
[[Template:Wikidata image]] | [[Template:Wikidata image]] may be added to infobox templates to implement tracking of articles using the infobox which might be improved by adding an image. When an article uses the infobox without an image, but the article's [[Wikidata]] has an image name, the article is added to a hidden tracking category ([[:Category:No local image but image on Wikidata|No local image but image on Wikidata]]). Once an image is added to the infobox, the article is removed from the category. The template also allows excluding individual articles from the category without adding an image. | ||
== Usage == | |||
Add the following to a template (if necessary, change "image" to whatever parameter name that template uses to display an image): | |||
:<code><nowiki> | |||
<includeonly>{{Wikidata image |1={{{image|}}} }}</includeonly> | |||
</nowiki></code> | |||
To allow individual articles using the template to be excluded from the tracking category, add the following instead: | |||
<code><nowiki> | :<code><nowiki> | ||
<includeonly>{{Wikidata image|1={{{image|}}} }}</includeonly> | <includeonly>{{Wikidata image |1={{{image|}}} |2={{{nocat_wdimage|}}} }}</includeonly> | ||
</nowiki></code> | </nowiki></code> | ||
== Parameters == | |||
This template accepts two unnamed parameters: | |||
# (required) A parameter, if not specified, | |||
The parameter name used by the infobox to display an image. This is usually <code><nowiki>{{{image|}}}</nowiki></code>. | |||
# (optional) A parameter which, if defined, will prevent the addition of the tracking category. | |||
A parameter name used to exclude an article from the tracking category. For most infoboxes using this template, this is <code><nowiki>{{{nocat_wdimage|}}}</nowiki></code>. | |||
== Infoboxes using this template == | |||
* {{tl|Infobox person}} and [[:Category:Templates calling Infobox person|templates calling Infobox person]] | |||
* {{tl|Infobox sportsperson}} and [[:Category:Templates calling Infobox sportsperson|templates calling Infobox sportsperson]] | |||
* {{tl|Infobox football biography}} | |||
* {{tl|Infobox bandy biography}} | |||
* {{tl|Infobox aircraft begin}} | |||
== See also == | |||
* [[User:Taketa/Wikidata Images]] | |||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | |
Revision as of 05:40, 31 January 2017
This is a documentation subpage for Template:Wikidata image. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used on 757,000+ pages, or roughly 11149% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
Template:Wikidata image may be added to infobox templates to implement tracking of articles using the infobox which might be improved by adding an image. When an article uses the infobox without an image, but the article's Wikidata has an image name, the article is added to a hidden tracking category (No local image but image on Wikidata). Once an image is added to the infobox, the article is removed from the category. The template also allows excluding individual articles from the category without adding an image.
Usage
Add the following to a template (if necessary, change "image" to whatever parameter name that template uses to display an image):
<includeonly>{{Wikidata image |1={{{image|}}} }}</includeonly>
To allow individual articles using the template to be excluded from the tracking category, add the following instead:
<includeonly>{{Wikidata image |1={{{image|}}} |2={{{nocat_wdimage|}}} }}</includeonly>
Parameters
This template accepts two unnamed parameters:
- (required) A parameter, if not specified,
The parameter name used by the infobox to display an image. This is usually {{{image|}}}
.
- (optional) A parameter which, if defined, will prevent the addition of the tracking category.
A parameter name used to exclude an article from the tracking category. For most infoboxes using this template, this is {{{nocat_wdimage|}}}
.
Infoboxes using this template
- {{Infobox person}} and templates calling Infobox person
- {{Infobox sportsperson}} and templates calling Infobox sportsperson
- {{Infobox football biography}}
- {{Infobox bandy biography}}
- {{Infobox aircraft begin}}
See also