Difference between revisions of "Template:Infobox organization/Wikidata/sandbox"
imported>Uzume (Module:Wikidata->Module:WikidataIB and remove usage of deprecated "getPreferredValue") |
imported>MJL (Copied content from Special:Permalink/987540993) |
||
| Line 1: | Line 1: | ||
| − | {{Infobox | + | {{Infobox |
| − | | | + | | bodyclass = vcard |
| − | | | + | | bodystyle = {{{bodystyle|}}} |
| − | |||
| − | |||
| − | |||
| titleclass = fn org | | titleclass = fn org | ||
| − | | title = {{{name|{{{organization_name|{{{Non-profit_name| | + | | title = {{{name|{{{organization_name|{{{Non-profit_name|{{PAGENAMEBASE}}}}}}}}}}} |
| − | | subheader = {{#if:{{{native_name|{{{native name|}}}}}}|< | + | | subheader = {{#if:{{{full_name|{{{full name|}}}}}}|<div {{#if:{{{full_name_lang|{{{full name lang|}}}}}}|lang="{{{full_name_lang|{{{full name lang|}}}}}}"}}>{{{full_name|{{{full name|}}}}}}</div>}} |
| + | | subheader2 = {{#if:{{{native_name|{{{native name|}}}}}}|<div class="nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name|{{{native name}}}}}}</div>}} | ||
| − | | image = {{#invoke:InfoboxImage |InfoboxImage |image={{ | + | | image = {{#invoke:InfoboxImage|InfoboxImage |image={{{logo|{{{organization_logo|{{{Non-profit_logo|}}}}}}}}} |size={{{logo_size|}}} |sizedefault=250px |alt={{{logo_alt|}}} }} |
| − | | caption = | + | | caption = {{{logo_caption|}}} |
| − | | image2 = {{#invoke:InfoboxImage|InfoboxImage |image={{ | + | | image2 = {{#invoke:InfoboxImage|InfoboxImage |image={{{image|}}} |size={{{image_size|{{{imagesize|{{{size|}}}}}}}}} |sizedefault=frameless |alt={{{image_alt|{{{alt|}}}}}} }} |
| − | | caption2 = {{{ | + | | caption2 = {{{caption|}}} |
| − | | image3 = {{#invoke:InfoboxImage|InfoboxImage |image | + | | image3 = {{#invoke:InfoboxImage|InfoboxImage |image={{{map|}}} |size={{{map_size|{{{msize|}}}}}} |sizedefault=250px |alt={{{map_alt|{{{malt|}}}}}} }} |
| − | | caption3 = {{{ | + | | caption3 = {{{map_caption|{{{mcaption|}}}}}} |
| − | | image4 = {{#invoke:InfoboxImage|InfoboxImage |image={{ | + | | image4 = {{#invoke:InfoboxImage|InfoboxImage |image={{{map2|}}} |size={{{map2_size|}}} |sizedefault=250px |alt={{{map2_alt|}}} }} |
| − | | caption4 = {{{ | + | | caption4 = {{{map2_caption|}}} |
| − | | image5 = {{# | + | | image5 = {{#if:{{{pushpin_map|{{{map_type|}}}}}}|{{Location map|{{{pushpin_map|{{{map_type}}}}}} |
| − | | | + | | border = infobox |
| + | | caption = {{#switch:{{{map_caption|}}}|#default={{{map_caption}}}|none=|=Location within {{#invoke:Location map|data|{{{pushpin_map|{{{map_type}}}}}}|name}}}} | ||
| + | | float = center | ||
| + | | alt = {{{map_alt|}}} | ||
| + | | width = {{#if:{{{map_size|}}}|{{{map_size}}}|220}} | ||
| + | | relief = {{{pushpin_relief|{{{map_relief|}}}}}} | ||
| + | | label = {{{map_dot_label|}}} | ||
| + | | coordinates = {{{coordinates|}}} | ||
| + | }}}} | ||
| labelstyle = padding-right:0.6em;<!--(to ensure some gap between any (long/unwrapped) labels and subsequent data on same line)--> | | labelstyle = padding-right:0.6em;<!--(to ensure some gap between any (long/unwrapped) labels and subsequent data on same line)--> | ||
| Line 29: | Line 35: | ||
| label1 = Abbreviation | | label1 = Abbreviation | ||
| class1 = nickname | | class1 = nickname | ||
| − | | data1 = | + | | data1 = {{{abbreviation|}}} |
| − | | label2 = | + | | label2 = Nickname |
| − | | | + | | class2 = nickname |
| + | | data2 = {{{nickname|}}} | ||
| − | | label3 | + | | label3 = Pronunciation |
| − | | data3 | + | | data3 = {{#if:{{{pronounce|}}}{{{Pronounce|}}}{{{Pronunciation|}}}{{{pronunciation|}}}{{{pronounce comment|}}} |<!-- |
| + | -->{{Unbulleted list|1={{{pronounce|}}}{{{Pronounce|}}}{{{Pronunciation|}}}{{{pronunciation|}}}{{{pronounce ref|}}} {{{pronounce comment|}}}<!-- | ||
| + | -->|2={{{pronounce 2|}}} }}}} | ||
| − | | label4 = | + | | label4 = Named after |
| − | | data4 = | + | | data4 = {{{named_after|}}} |
| label5 = Motto | | label5 = Motto | ||
| − | | data5 = {{# | + | | class5 = note |
| + | | data5 = {{{motto|{{{organization_motto|{{{pledge|}}}}}}}}} | ||
| + | |||
| + | | label6 = Predecessor | ||
| + | | data6 = {{{predecessor|}}} | ||
| + | |||
| + | | label7 = Merged into | ||
| + | | data7 = {{{merged|}}} | ||
| + | |||
| + | | label8 = Successor | ||
| + | | data8 = {{{successor|}}} | ||
| + | |||
| + | | label9 = {{#if:{{{formation|}}} |Formation |{{#if:{{{founded_date|{{{founded|}}}}}}|Founded|Established}} }} | ||
| + | | class9 = note | ||
| + | | data9 = {{if empty |{{{formation|}}} |{{{established|}}} |{{{founded_date|{{{founded|}}}}}} }} | ||
| + | |||
| + | | label10 = Founder{{#if:{{{founders|}}}|s}} | ||
| + | | data10 = {{#if:{{{founders|}}} |{{{founders}}} |{{{founder|}}} }} | ||
| + | |||
| + | | label11 = Founded at | ||
| + | | data11 = {{{founding_location|}}} | ||
| + | |||
| + | | label12 = {{#if:{{{defunct|}}}|Defunct|Dissolved}} | ||
| + | | data12 = {{{defunct|{{{dissolved|}}}}}} | ||
| + | |||
| + | | label13 = Merger of | ||
| + | | data13 = {{{merger|}}} | ||
| + | |||
| + | | label14 = Type | ||
| + | | data14 = {{{type|{{{organization_type|{{{Non-profit_type|}}}}}}}}} | ||
| + | |||
| + | | label15 = {{longitem |{{#if:{{{vat_id|}}} |[[VAT identification number|VAT ID no.]] |[[Taxpayer Identification Number|Tax ID no.]]}} }} | ||
| + | | data15 = {{#if:{{{vat_id|}}} |{{{vat_id}}} |{{{tax_id|}}} }} | ||
| + | |||
| + | | label16 = Registration no. | ||
| + | | data16 = {{{registration_id|}}} | ||
| + | |||
| + | | label17 = Legal status | ||
| + | | data17 = {{{status|}}} | ||
| + | |||
| + | | label18 = {{#if:{{{focus|{{{foci|}}}}}} |Focus |Purpose}} | ||
| + | | data18 = {{#if:{{{focus|{{{foci|}}}}}} |{{{focus|{{{foci|}}}}}} |{{{purpose|}}} }} | ||
| + | |||
| + | | label19 = {{longitem|Professional title}} | ||
| + | | data19 = {{{professional_title|}}} | ||
| + | |||
| + | | label20 = Headquarters | ||
| + | | data20 = {{{headquarters|}}} | ||
| + | |||
| + | | label21 = Location | ||
| + | | class21 = label | ||
| + | | data21 = {{Unbulleted list | ||
| + | | 1 = {{comma separated entries | ||
| + | | 1 = {{#if:{{{location_city|}}} |<span class="locality">{{{location_city}}}</span>}} | ||
| + | | 2 = {{#if:{{{location_country|}}} |<span class="country-name">{{{location_country}}}</span>}} | ||
| + | }} | ||
| + | | 2 = {{{location|}}} | ||
| + | | 3 = {{comma separated entries | ||
| + | | 1 = {{#if:{{{location_city2|}}} |<span class="locality">{{{location_city2}}}</span>}} | ||
| + | | 2 = {{#if:{{{location_country2|}}} |<span class="country-name">{{{location_country2}}}</span>}} | ||
| + | }} | ||
| + | | 4 = {{{location2|}}} | ||
| + | }} | ||
| + | |||
| + | | label22 = Locations | ||
| + | | class22 = label | ||
| + | | data22 = {{Unbulleted list | ||
| + | | 1 = {{comma separated entries | ||
| + | | 1 = {{#if:{{{addnl_location_city|}}} |<span class="locality">{{{addnl_location_city}}}</span>}} | ||
| + | | 2 = {{#if:{{{addnl_location_country|}}} |<span class="country-name">{{{addnl_location_country}}}</span>}} | ||
| + | }} | ||
| + | | 2 = {{{addnl_location|{{{additional_location|}}}}}} | ||
| + | | 3 = {{comma separated entries | ||
| + | | 1 = {{#if:{{{addnl_location_city2|}}} |<span class="locality">{{{addnl_location_city2}}}</span>}} | ||
| + | | 2 = {{#if:{{{addnl_location_country2|}}} |<span class="country-name">{{{addnl_location_country2}}}</span>}} | ||
| + | }} | ||
| + | | 4 = {{{addnl_location2|{{{additional_location2|}}}}}} | ||
| + | }} | ||
| + | |||
| + | | label23 = Coordinates | ||
| + | | data23 = {{{coordinates|{{{coords|}}}}}} | ||
| + | |||
| + | | label24 = Origins | ||
| + | | data24 = {{{origins|}}} | ||
| + | |||
| + | | label25 = {{longitem |{{#if:{{{area_served|}}} |Area served |Region {{#if:{{{region_served|}}}|served}} }} }} | ||
| + | | data25 = {{if empty |{{{area_served|}}} |{{{region_served|}}} |{{{region|}}} }} | ||
| − | | | + | | label26 = Product{{#if:{{{products|}}}|s}} |
| − | + | | data26 = {{#if:{{{products|}}} |{{{products}}} |{{{product|}}} }} | |
| − | | | + | | label27 = Services |
| − | | | + | | class27 = note |
| + | | data27 = {{{services|}}} | ||
| − | | | + | | label28 = Method{{#if:{{{methods|}}}|s}} |
| − | + | | data28 = {{#if:{{{methods|}}} |{{{methods}}} |{{{method|}}} }} | |
| − | | | + | | label29 = Field{{#if:{{{fields|}}}|s}} |
| − | + | | data29 = {{#if:{{{fields|}}} |{{{fields}}} |{{{field|}}} }} | |
| − | | | + | | label30 = {{longitem |Members{{#if:{{{num_members|{{{members|}}}}}}||hip}} {{#if:{{{num_members_year|{{{membership_year|}}}}}} |{{nobold|({{{num_members_year|{{{membership_year|}}}}}})}} }} }} |
| − | | | + | | data30 = {{#if:{{{num_members|{{{members|}}}}}} |{{{num_members|{{{members}}}}}} |{{{membership|}}} }} |
| − | | | + | | label31 = {{longitem |Official language{{#if:{{{languages|}}}|s}} }} |
| − | | | + | | data31 = {{#if:{{{languages|}}} |{{{languages}}} |{{{language|}}} }} |
| − | | | + | | label32 = Owner{{#if:{{{owners|}}}|s}} |
| − | + | | data32 = {{#if:{{{owners|}}} |{{{owners}}} |{{{owner|}}} }} | |
| − | | | + | | label33 = {{longitem|{{#if:{{{gen_sec|}}}|General Secretary|Secretary General}}}} |
| − | | | + | | data33 = {{#if:{{{general|}}} |{{{general}}} |{{#if:{{{gen_sec|}}} |{{{gen_sec}}} |{{{sec_gen|}}} }}}} |
| − | | | + | | label34 = {{#if:{{{leader_title|}}} |{{longitem|{{{leader_title}}}}} |Leader}} |
| − | + | | data34 = {{{leader_name|}}} | |
| − | | | + | | label35 = {{longitem|{{{leader_title2}}}}} |
| − | | | + | | data35 = {{#if:{{{leader_title2|}}} |{{{leader_name2|}}} }} |
| − | | | + | | label36 = {{longitem|{{{leader_title3}}}}} |
| − | + | | data36 = {{#if:{{{leader_title3|}}} |{{{leader_name3|}}} }} | |
| − | | | + | | label37 = {{longitem|{{{leader_title4}}}}} |
| − | + | | data37 = {{#if:{{{leader_title4|}}} |{{{leader_name4|}}} }} | |
| − | | | + | | label38 = {{longitem|[[Board of directors|{{allow wrap|Board of directors}}]]}} |
| − | + | | data38 = {{{board_of_directors|}}} | |
| − | | | + | | label39 = {{longitem|Key people}} |
| − | + | | data39 = {{{key_people|}}} | |
| − | | | + | | label40 = {{#if:{{{main_organ|}}} |{{longitem|Main organ}} |Publication}} |
| − | + | | data40 = {{#if:{{{main_organ|}}} |{{{main_organ}}} |{{{publication|}}} }} | |
| − | | | + | | label41 = {{longitem|Parent organi{{#if:{{{parent_organisation|}}}|s|z}}ation}} |
| − | | | + | | data41 = {{#if:{{{parent_organisation|}}} |{{{parent_organisation}}} |{{{parent_organization|}}} }} |
| − | | | + | | label42 = [[Subsidiary|Subsidiaries]] |
| − | | | + | | data42 = {{#if:{{{subsidiaries|}}} |{{{subsidiaries}}} |{{{subsid|}}} }} |
| − | | | + | | label43 = Secessions |
| − | | | + | | data43 = {{{secessions|}}} |
| − | + | | label44 = Affiliations | |
| − | + | | data44 = {{{affiliations|}}} | |
| − | |||
| − | |||
| − | |||
| − | | | + | | label45 = {{longitem |Budget {{#if:{{{budget_year|}}} |{{nobold|({{{budget_year}}})}} }} }} |
| − | + | | data45 = {{{budget|}}} | |
| − | | | + | | label46 = {{longitem |Revenue {{#if:{{{revenue_year|{{{income_year|}}}}}} |{{nobold|({{{revenue_year|{{{income_year|}}}}}})}} }} }} |
| − | + | | data46 = {{{revenue|{{{income|}}}}}} | |
| − | | | + | | label47 = Disbursements |
| − | | | + | | data47 = {{{disbursed|{{{disbursements|{{{disbursement|}}}}}}}}} |
| − | | | + | | label48 = Expenses {{#if:{{{expenses_year|}}} | {{nobold|({{{expenses_year}}})}} }} |
| − | + | | data48 = {{{expenses|{{{spent|{{{expense|}}}}}}}}} | |
| − | | | + | | label49 = [[Financial endowment|Endowment]] {{#if:{{{endowment_year|}}} | {{nobold|({{{endowment_year}}})}} }} |
| − | | | + | | data49 = {{{endowment|}}} |
| − | | | + | | label50 = {{longitem |{{#if:{{{num_staff|}}}{{{staff|}}} |Staff |Employees}} {{#if:{{{num_staff_year|{{{staff_year|{{{num_employees_year|{{{employees_year|}}}}}}}}}}}} |{{nobold|({{{num_staff_year|{{{staff_year|{{{num_employees_year|{{{employees_year|}}}}}}}}}}}})}} }} }} |
| − | | | + | | data50 = {{if empty |{{{num_staff|}}} |{{{staff|}}} |{{{num_employees|}}} |{{{employees|}}} }} |
| − | | | + | | label51 = {{longitem |Volunteers {{#if:{{{num_volunteers_year|{{{volunteers_year|}}}}}} |{{nobold|({{{num_volunteers_year|{{{volunteers_year|}}}}}})}} }} }} |
| − | | | + | | data51 = {{#if:{{{num_volunteers|}}} |{{{num_volunteers}}} |{{{volunteers|}}} }} |
| − | | | + | | label52 = {{longitem |Students {{#if:{{{students_year|}}} |{{nobold|({{{students_year|}}})}} }} }} |
| − | | | + | | data52 = {{{students|}}} |
| − | | | + | | label53 = Award(s) |
| − | | | + | | data53 = {{{awards|}}} |
| − | | | + | | label54 = Website |
| − | | | + | | data54 = {{{website|{{{homepage|}}}}}} |
| − | | | + | | label55 = Remarks |
| − | | | + | | data55 = {{{remarks|}}} |
| − | | | + | | label56 = {{longitem|Formerly called}} |
| − | | | + | | class56 = nickname |
| + | | data56 = {{if empty |{{{former name|}}} |{{{former_name|}}} |{{{former|}}} |{{{formerly|}}} }} | ||
| − | | | + | | belowstyle = border-top:#aaa 1px solid; |
| + | | below = {{{footnotes|}}} | ||
}}<!-- Tracking categories: | }}<!-- Tracking categories: | ||
| − | -->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox organization with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview = Page using [[Template:Infobox organization | + | -->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox organization with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox organization]] with unknown parameter "_VALUE_"|ignoreblank=y| abbreviation | additional_location | additional_location2 | addnl_location | addnl_location_city | addnl_location_city2 | addnl_location_country | addnl_location_country2 | addnl_location2 | affiliations | alt | area_served | awards | board_of_directors | bodystyle | budget | budget_year | caption | coordinates | coords | defunct | disbursed | disbursement | disbursements | dissolved | employees | employees_year | endowment | endowment_year | established | expense | expenses | expenses_year | field | fields | foci | focus | footnotes | formation | former | former name | former_name | formerly | founded | founded_date | founder | founders | founding_location | full name | full name lang | full_name | full_name_lang | gen_sec | general | headquarters | homepage | image | image_alt | image_size | imagesize | income | income_year | key_people | language | languages | leader_name | leader_name2 | leader_name3 | leader_name4 | leader_title | leader_title2 | leader_title3 | leader_title4 | location | location_city | location_city2 | location_country | location_country2 | location2 | logo | logo_alt | logo_caption | logo_size | main_organ | malt | map | map dot label | map_alt | map_caption | map_dot_label | map_relief | map_size | map_type | map2 | map2_alt | map2_caption | map2_size | mcaption | members | membership | membership_year | merged | merger | method | methods | motto | msize | name | named_after | native name | native_name | native_name_lang | nickname | Non-profit_logo | Non-profit_name | Non-profit_type | num_employees | num_employees_year | num_members | num_members_year | num_staff | num_staff_year | num_volunteers | num_volunteers_year | organization_logo | organization_motto | organization_name | organization_type | origins | owner | owners | parent_organisation | parent_organization | pledge | predecessor | product | products | professional_title | pronounce | Pronounce | pronounce 2 | pronounce comment | pronounce ref | Pronunciation | pronunciation | publication | purpose | pushpin_map | pushpin_relief | region | region_served | registration_id | remarks | revenue | revenue_year | sec_gen | secessions | services | size | spent | staff | staff_year | status | students | students_year | subsid | subsidiaries | successor | tax_id | type | vat_id | volunteers | volunteers_year | website }}<!--Tracking cat for native name lang parameter-->{{#if:{{{native_name|}}}|{{#if:{{{native_name_lang|}}}||[[Category:Infoboxes without native name language parameter]]}}|}}<noinclude> |
| − | | | + | {{documentation}} |
| − | }}<noinclude> | ||
| − | {{ | ||
</noinclude> | </noinclude> | ||
Revision as of 17:13, 1 January 2021
| Established | Script error: No such module "If empty". |
|---|---|
Region | Script error: No such module "If empty". |
Employees | Script error: No such module "If empty". |
Formerly called | Script error: No such module "If empty". |
| 50px | This is the template sandbox page for Template:Infobox organization/Wikidata (diff). See also the companion subpage for test cases. |
| 30px | This template uses Lua: |
| 40x40px | When adding an infobox using data from Wikidata, please check for consistency with the article and its references, and address the inconsistencies observed, which can be done by amending the article or the Wikidata entry, or by supplying a better value to the infobox as a local parameter if this is what emerges from the sources. |
This version of {{Infobox organisation}} retrieves various parameter values from Wikidata if enabled ("opt-in"), but only in the absence of a locally supplied value. The template calls Module:Wikidata and Module:WikidataIB.
It allows editors at the article level to blacklist various fields so that they do not display. This makes a positive statement that those fields are unsuitable for inclusion in that article's infobox.
Usage
Basic
| Coordinates | Lua error in Module:Coordinates at line 611: attempt to index field 'wikibase' (a nil value).Template:WikidataScript error: No such module "EditAtWikidata". |
|---|---|
Just use:
{{infobox organization/Wikidata | fetchwikidata=ALL}}
and you should get a Wikidata-filled infobox! (Providing the article is linked to a Wikidata entry containing relevant information!). This will by default only fetch information that is sourced on Wikidata.
General example
{{infobox organisation/Wikidata
| suppressfields=flag official_language
| noicon=on
...
}}
This will prevent the infobox from displaying the fields for flag or . |noicon=on will suppress the pencil icons in favour of a single "edit on Wikidata" link at the bottom (see WHO, right).
Parameters
| Parameter | Effect |
|---|---|
| fetchwikidata | allows a whitelist of fields that may be imported from Wikidata; set to "ALL" for all fields; defaults to none |
| suppressfields | allows a blacklist of fields that may be displayed in this infobox; overrides whitelist; defaults to none |
| onlysourced | rejects Wikidata that is unsourced or only imported from a Wikipedia; values: yes/true/1 or no/false/0; defaults to yes |
See also
| The above documentation is transcluded from Template:Infobox organization/Wikidata/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |