Templat:Wikidata list/doc: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan |
kTidak ada ringkasan suntingan |
||
(2 revisi perantara oleh 2 pengguna tidak ditampilkan) | |||
Baris 1:
{{Documentation subpage}}
<!--
== Penggunaan ==
Templat ini menghasilkan daftar otomatis yang dihasilkan oleh bot dari Wikidata ([http://magnusmanske.de/wordpress/?p=301 pos blog asli]). Templat ini harus diakhiri dengan {{tl|Wikidata list end}}; teks yang berada di antara templat akan diperbaharui secara berkala (sekali dalam 24 jam) dan akan digantikan dengan daftar yang dihasilkan oleh bot. Saat ini hanya memungkinkan satu daftar per halaman.
Kueri '''HARUS''' termasuk variable <code>?item</code> variable - jangan diubah namanya.
Contoh:
{{tlf|{{BASEPAGENAME}}
|'''sparql'''{{=}}<br/>
Baris 26 ⟶ 23:
|'''wdedit'''{{=}}yes<br/>
}}
... (
{{tl|Wikidata list end}}
Parameter:
;sparql:A [[:mw:Wikidata query service/User Manual#Basics - Understanding SPO (Subject, Predicate, Object) also known as a Semantic Triple|SPARQL ''SELECT'' query]]. Needs to return <code>?item</code> as the item number.
'''Mandatory'''. <br> ;columns:
:* <code>number</code>,
:* <code>label</code>,
:* <code>label/de</code>,
:* <code>description</code>,
:* <code>item</code>,
:* <code>Pxxx</code>
:* <code>Pxxx/Pzzz</code>, qualifier properties; for Pxxx linking to an item Qyyy and having a Pzzz qualifier, the Qxxx linked label and the value of Pzzz
:* <code>Pxxx/Qyyy/Pzzz</code>, qualifier properties; for Pxxx linking to an item Qyyy and having a Pzzz qualifier, the value of Pzzz. This is a version of the above, specific for a single item; e.g., "p553/q866/p554" to get YouTube account names.
Baris 43 ⟶ 42:
:Values marked as "deprecated" are not shown. Every column can optionally have a title generation by adding ":TITLE", otherwise the Wikidata property name is used. '''Mandatory'''
;sort:The initial sort key for the table. Valid values are:
:* <code>label</code>,
:* <code>family_name</code>, tries to find, and sort by, the family (last) name from the label, assuming items are people. This is a heuristic and may not work properly in all cases. If possible, try to sort by P734 (family name).
:* <code>Pxxx</code>, a Wikidata property
: ''
;section:Daftar ini dapat dibagi oleh sebuah properti Wikidata. ''Opsional''
;min_section:The minimum number of entries to generate a section when used together with <code>section</code>. All other entries will be put under section "misc". Default:2. ''
;autolist:If ''description'' is a column but no description exists on Wikidata, "autolist=fallback" uses [https://tools.wmflabs.org/autodesc/ AutoDesc] to generate one. ''
;language:Label/description language, if different from site language. ''
;thumb:The thumbnail width for images (e.g. column P18). Default:128. ''
;links:How to render links not in the local Wikipedia. Valid values are:
:* <code>all</code> to link to Wikidata. Default.
Baris 59:
:* <code>text</code> to generate blue links for existing pages, and plain text otherwise.
:* <code>reasonator</code> to generate blue links for existing pages, and links to [https://tools.wmflabs.org/reasonator/ Reasonator] otherwise.
:''Opsional''
;
;header_template:Generates a template call rather than a table header; the template must then generate the table header. No parameters are passed to this template. Recommended to be used with <code>row_template</code>. ''Opsional''
;skip_table:Suppresses the table markup completely when using <code>row_template</code>. Any value will work.
;wdedit:Generates information that allows Wikidata editing from Wikipedia using [https://www.wikidata.org/w/index.php?title=User:Magnus_Manske/wd_edit.js this JavaScript]. Value needs to be <code>yes</code>. Does not work when <code>row_template</code> is used.
;references:
;freq:
;summary:Daftar kunci yang dipisahkan koma untuk ditambahkan sebagai ringkasan di bawah semua konten lainnya. ''Opsional''
:* <code>itemnumber</code> The total number of items (rows) in this list.
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!--
[[Kategori:Templat Wikidata]]
}}</includeonly>
|