Template:Wikidata image/doc: Difference between revisions
meta>Shellwood m Reverted edits by 2600:1:C736:C82E:B116:82DF:B24B:2C90 (talk) (HG) (3.1.22) |
meta>RajkGuj m Correcting spelling: ususally->usually |
||
Line 22: | Line 22: | ||
This template accepts two unnamed parameters: | This template accepts two unnamed parameters: | ||
# (required) If no value is assigned, adds the tracking category. This should be the parameter name used by the infobox to display an image, usually <code><nowiki>{{{image|}}}</nowiki></code>. | # (required) If no value is assigned, adds the tracking category. This should be the parameter name used by the infobox to display an image, usually <code><nowiki>{{{image|}}}</nowiki></code>. | ||
# (optional) If any value is assigned, does not add the tracking category. This should be a parameter name used by the infobox to exclude an individual article from the category, | # (optional) If any value is assigned, does not add the tracking category. This should be a parameter name used by the infobox to exclude an individual article from the category, usually <code><nowiki>{{{nocat_wdimage|}}}</nowiki></code>. | ||
== Infoboxes using this template == | == Infoboxes using this template == |
Revision as of 19:29, 13 September 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 11147% 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) If no value is assigned, adds the tracking category. This should be the parameter name used by the infobox to display an image, usually
{{{image|}}}
. - (optional) If any value is assigned, does not add the tracking category. This should be a parameter name used by the infobox to exclude an individual article from the category, usually
{{{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}}
- {{Infobox book}}
See also