Movatterモバイル変換


[0]ホーム

URL:


Jump to content
Wikimedia Commons
Search

Template:Wikidata Infobox/core

This page is protected against editing.
From Wikimedia Commons, the free media repository
<Template:Wikidata Infobox
NO WIKIDATA ID FOUND!

Search for Wikidata Infobox/core on Wikidata

Create new Wikidata item
ProtectedThis template has been protected from editing to prevent vandalism.
Please discuss changes on thetalk page orrequest unprotection.
Template documentation[ view ·edit ·history ·purge ]
This documentation istranscluded fromTemplate:Wikidata Infobox/core/doc.
⚠
Note: This template is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum. Pleasediscuss proposed changes onthe talk page first.

Afterwards, changes caninitially be done at and tested withTemplate:Wikidata Infobox/sandbox.

  • Editing a template causesall pages that use the template to be re-rendered. If the template is used often, this can put a lot of load on the servers since it fills up thejob queue.
  • Keep in mind that templates that are used on file description pages alsoshow up on other wikis.
  • This page has been protected from editing to prevent vandalism. Only administrators can edit it. Get their attention by placing{{Edit protected}} at thetalk page.
    This page is protected against editing.
Lua logoUsesLua:
CSSThis template usesTemplateStyles:
WikidataCon Award 2019

Includes a Wikidata-enabled infobox on category pages. SeeCommons:Wikidata infobox help for the FAQ.

The template automatically sets the following categories:

  • Interwikis from Wikidata
  • For people: given name(s) and surname(s), alive/deceased person/man/woman, years of birth and death, awards

Usage

{{Wikidata Infobox
 |qid          =
 |defaultsort  =
 |interwiki    =
 |autocat      =
 |trackingcats =
}}

English: In most cases it can be used simply as{{Wikidata Infobox}}. The category page needs to be linked to through a sitelink on Wikidata (under 'other sites', add the correct sitelink to 'commons'). The Wikidata entry can either be directly about the category's topic, or include thecategory's main topic(P301).

This template mustnever be transcluded via another template, it has to always be directly used in categories and galleries - doing otherwise will lead to duplicate uses of this template. It can be used on template documentation pages (use the 'qid' parameter to link it correctly), or by noinclude'ing it in the template so it just shows on the template page rather than transclusions. (find transclusions to remove)

Common issues

If you see a Wikidata QID (a number, prefixed with "Q") instead of the correct title, then that means that the topic does not have a label in English – to fix this, add an English label on Wikidata. If you see content that's not in your own language, then that probably means that a label isn't available in your language – to fix this, add the appropriate label in your language on Wikidata.

If you spot a problem with the information displayed in the infobox, please first try to fix it on Wikidata. For further info seeCommons:Wikidata infobox help, which also has extensive information about the many types of images desired on Wikidata. If that fails, ask on thetemplate talk page.

If the infobox is empty, or it doesn't contain all of the information you think it should, then please expand the Wikidata entry. The infobox should grow accordingly, though the page on Wikimedia Commons might needpurging to show very recent updates from Wikidata.

Customisation

If you do not want to see the infobox, then add#wdinfobox { display: none;} toSpecial:MyPage/common.css and it will not be displayed.

To display the infobox in a horizontal format, add the following toSpecial:MyPage/common.css. Note that this will only work in some browsers (Chrome and Safari should work, but Firefox won't):

#wdinfobox { width:100%!important; clear:both!important; display: block; -webkit-column-count: 4; -ms-column-count: 4; -moz-column-count: 4; column-count: 4; }

You can also use Javascript to change the settings by adding the following toSpecial:MyPage/common.js:

  • To auto-hide the whole infobox:$( "#wdinfobox" ).addClass( "mw-collapsed" );
  • To auto-hide the authority control:$( "#wdinfo_ac" ).addClass( "mw-collapsed" );
  • To auto-hide the taxon tree:$( "#wdinfo_taxon" ).addClass( "mw-collapsed" );
  • To never display the infobox:$( "#wdinfobox" ).addClass( "wdinfobox_hide" );
  • To display the infobox horizontally:$( "#wdinfobox" ).addClass( "wdinfobox_horizontal" );

Maintenance

Uses of this template are categorised intoCategory:Uses of Wikidata Infobox orCategory:Uses of Wikidata Infobox with no item depending on whether the template can find a QID.

Template developers: please ensure that if you are nesting {{Wikidata Infobox}} inside another template that you are wrapping it accordingly, that is<includeonly>{{Wikidata Infobox}}</includeonly>, so that it doesn't categorise the template.

For past discussions about this template, see:

For further help, seeCommons:Wikidata infobox help

Template parameters

ParameterDescriptionDefaultStatus
qidQIDQ ID (number) of the topic; overrides lookup in the database for this ID.Value ofcategory's main topic(P301) if available, otherwise the ID of the connected Wikidata itemoptional
defaultsortDisable DEFAULTSORTSet to “no” to disable auto-adding a{{DEFAULTSORT}}yoptional
interwikiinterwikiSet to “no” to disable auto-adding interwiki links usingModule:Interwikiyesoptional
autocatautomatic categorisationSet to “no” to disable automatic categorisation under categories such asCategory:Living peopleyesoptional
trackingcatstracking categoriesSet to “no” to disable automatic addition of hidden categories such asCategory:Uses of Wikidata Infoboxyesoptional
spf
suppressfields
suppressfieldsComma-separated denylist of property IDs passed to WikidataIB, e.g. "P1923,P527" (note that some properties cannot be hidden)emptyoptional
fwd
fetchwikidata
fetchwikidataComma-separated allowlist of property IDs passed to WikidataIB, e.g. "P31"ALLoptional
<templatedata>JSON</templatedata> ./.{{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used byVisualEditor and possibly other tools likeUpload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use{{TemplateBox}} with either‎useTemplateData=1 or‎useTemplateData=only on the‎/doc subpage and transcluding it with{{Documentation}} into the template.‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

Includes a Wikidata-enabled infobox on category pages. See https://commons.wikimedia.org/wiki/Commons:Wikidata_infobox_help for the FAQ.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
automatic categorisationautocat

Set to “no” to disable automatic categorisation under categories such as “Living people”

Default
yes
Lineoptional
Disable DEFAULTSORTdefaultsort

Set to “no” to disable auto-adding the default category sort key (i.e. {{DEFAULTSORT}}).

Default
y
Lineoptional
fetchwikidatafwdfetchwikidata

Comma-separated allowlist of property IDs passed to WikidataIB, e.g. "P31"

Default
ALL
Lineoptional
interwikiinterwiki

Set to “no” to disable auto-adding interwiki links

Default
yes
Lineoptional
QIDqid

Q ID (number) of the topic; overrides lookup in the database for this ID.

Default
Value of "category's main topic" (P301) if available, otherwise the ID of the connected Wikidata item
Lineoptional
suppressfieldsspfsuppressfields

Comma-separated denylist of property IDs passed to WikidataIB, e.g. "P1923,P527" (note that some properties cannot be hidden)

Lineoptional
tracking categoriestrackingcats

Set to “no” to disable automatic addition of hidden categories such as “Uses of Wikidata Infobox”

Default
yes
Lineoptional

Additional information

The template is intended to be used in the following namespaces:the Category namespace

The template is intended to be used by the following user groups:no user group specified

Placement:At the top of the page

Relies on:
Module:WikidataIB;Module:Wikidata4Bio;Module:Taxontree;Module:Coordinates;{{Unbulleted list}};{{SuperFallback}};{{Dir}}

Localization

Bahasa Indonesia italiano magyar Frysk español Lëtzebuergesch Deutsch galego Nederlands English čeština français hrvatski Esperanto Napulitano беларуская (тарашкевіца) 한국어 shqip العربية বাংলা српски / srpski ଓଡ଼ିଆ मराठी اردو slovenščina polski മലയാളം తెలుగు vèneto українська português do Brasil 粵語 Türkçe ไทย suomi 中文 ꠍꠤꠟꠐꠤ македонски svenska +/−

This template makes use of{{Autotranslate}} andthe translate extension.


Wikidata properties

Copying this template to other wikis

  1. Import dependenciesModule:WikidataIB andTemplate:Unbulleted list
  2. Importw:Template:Wikidata Infobox/i18n/getMsg andw:Module:Wikidata Infobox/i18n from Wikipedia
  3. Importd:Template:Wikidata Infobox/core andd:Template:Wikidata Infobox/styles.css from Wikidata
  4. ImportModule:Wikidata Infobox from Commons
  5. ImportTemplate:Wikidata Infobox and configure it to your liking

AskMike Peel orLennardHofmann if you need help.

Core and sandboxes

The principal template is now a wrapper for the core code. This facilitates internationalisation by making parameter names easier to adapt.

Both templates have sandbox versions:

Issues

There are known issues, for which we invite suggested fixes:

Retrieved from "https://commons.wikimedia.org/w/index.php?title=Template:Wikidata_Infobox/core&oldid=908009253"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp