Difference between revisions of "Template:Infobox royalty/Wikidata"

From blackwiki
Jump to navigation Jump to search
imported>Idsmoend
imported>Idsmoend
(Get element order looking better)
Line 1: Line 1:
 
{{Infobox royalty
 
{{Infobox royalty
| qid = {{{qid|}}}
+
| spouse            = {{if empty|{{{spouses|}}}|{{{spouse|}}}}}
| onlysourced = {{{onlysourced|}}}
 
| succession = {{#if:{{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P642 |name=succession |fetchwikidata=ALL }}|King of {{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P642 |name=succession |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} | {{{succession|}}} }} }}
 
| reign = {{#if:{{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P580 |name=reign_start |fetchwikidata=ALL }}{{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P582 |name=reign_end |fetchwikidata=ALL }}|{{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P580 |name=reign_start |fetchwikidata={{{fetchwikidata|ALL}}} }} – {{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P582 |name=reign_end |fetchwikidata={{{fetchwikidata|ALL}}} }} }}
 
| predecessor = {{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P1365 |name=predecessor |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} | {{{predecessor|}}} }}
 
| successor = {{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P1366 |name=successor |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} | {{{successor|}}} }}
 
| religion = {{#invoke:WikidataIB |getValue |P140 |name=religion |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} | {{{religion|}}} }}
 
| father = {{#invoke:WikidataIB |getValue |P22 |name=father |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} |{{{father|}}} }}
 
| mother = {{#invoke:WikidataIB |getValue |P25 |name=mother |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} |{{{mother|}}} }}
 
| issue = {{#invoke:WikidataIB |getValue |P40 |name=issue |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} |{{{issue|}}} }}
 
| dynasty = {{#invoke:WikidataIB |getValue |P53 |name=dynasty |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} |{{{dynasty|}}} }}
 
 
| module            = {{Infobox_person/Wikidata
 
| module            = {{Infobox_person/Wikidata
   | child = yes
+
   | child = yes
  | embed  = yes
 
 
   | qid = {{{qid|}}}
 
   | qid = {{{qid|}}}
 
   | onlysourced = {{{onlysourced|}}}
 
   | onlysourced = {{{onlysourced|}}}
  | list = {{{list|}}}
 
 
   | noicon = {{{noicon|false}}}
 
   | noicon = {{{noicon|false}}}
 
   | fetchwikidata = {{{fetchwikidata|}}}
 
   | fetchwikidata = {{{fetchwikidata|}}}
   | suppressfields = {{#if:{{{suppressfields|}}}|{{{suppressfields|}}}, employer|employer}}
+
   | suppressfields = {{{suppressfields|}}}
  | honorific_prefix  = {{{honorific prefix|{{{honorific_prefix|}}}}}}
 
 
   | name              = {{{name|}}}
 
   | name              = {{{name|}}}
  | honorific_suffix  = {{{honorific suffix|{{{honorific_suffix|}}}}}}
 
 
   | native_name      = {{{native_name|}}}
 
   | native_name      = {{{native_name|}}}
 
   | native_name_lang  = {{{native_name_lang|}}}
 
   | native_name_lang  = {{{native_name_lang|}}}
Line 34: Line 20:
 
   | death_date        = {{{death_date|}}}
 
   | death_date        = {{{death_date|}}}
 
   | death_place      = {{{death_place|}}}
 
   | death_place      = {{{death_place|}}}
  | death_cause      = {{{death_cause|}}}
+
   | resting_place    = {{{resting place|{{{resting_place|{{{restingplace|{{{burial_place|}}}}}}}}}}}}
   | resting_place    = {{{resting place|{{{resting_place|{{{restingplace|}}}}}}}}}
+
   | spouse            = {{{spouse|}}}
  | resting_place_coordinates = {{{resting place coordinates|{{{resting_place_coordinates|{{{restingplacecoordinates|}}}}}}}}}  
 
   | spouse            = {{if empty|{{{spouses|}}}|{{{spouse|}}}}}
 
 
   | signature        = {{{signature|}}}
 
   | signature        = {{{signature|}}}
 
   | signature_alt    = {{{signature_alt|}}}
 
   | signature_alt    = {{{signature_alt|}}}
 +
  <!-- needed to make this a subbox sub-module in order to have its content appear below that of Infobox_person/Wikidata -->
 +
  | module            = {{Infobox royalty
 +
    | child = yes
 +
    | embed = yes
 +
    | subbox = yes
 +
    | qid = {{{qid|}}}
 +
    | onlysourced = {{{onlysourced|}}}
 +
    | succession = {{#if:{{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P642 |name=succession |fetchwikidata=ALL }}|King of {{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P642 |name=succession |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} | {{{succession|}}} }} }}
 +
    | reign = {{#if:{{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P580 |name=reign_start |fetchwikidata=ALL }}{{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P582 |name=reign_end |fetchwikidata=ALL }}|{{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P580 |name=reign_start |fetchwikidata={{{fetchwikidata|ALL}}} }} – {{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P582 |name=reign_end |fetchwikidata={{{fetchwikidata|ALL}}} }} }}
 +
    | predecessor = {{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P1365 |name=predecessor |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} | {{{predecessor|}}} }}
 +
    | successor = {{#invoke:WikidataIB |getQualifierValue |P39 |pval=Q12097 |qual=P1366 |name=successor |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} | {{{successor|}}} }}
 +
    | religion = {{#invoke:WikidataIB |getValue |P140 |name=religion |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} | {{{religion|}}} }}
 +
    | father = {{#invoke:WikidataIB |getValue |P22 |name=father |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} |{{{father|}}} }}
 +
    | mother = {{#invoke:WikidataIB |getValue |P25 |name=mother |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} |{{{mother|}}} }}
 +
    | issue = {{#invoke:WikidataIB |getValue |P40 |name=issue |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} |{{{issue|}}} }}
 +
    }}
 
   }}
 
   }}
<!--
 
| spouse = {{#invoke:WikidataIB |getValue |P26 |name=spouse |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |noicon={{{noicon|}}} |qid={{{qid|}}} |{{{spouse|}}} }}
 
| data56    = {{#invoke:WikidataIB | getValue | rank=best |P26 |name=spouse |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|}}}  |noicon={{{noicon|}}} | {{{spouse|}}} }}
 
-->
 
 
}}
 
}}
{{#invoke:check for unknown parameters|check|unknown=[[Category:Pages using wikidata infoboxes with additional parameters|_VALUE_]]|preview=unknown parameter "_VALUE_"|fetchwikidata|suppressfields|onlysourced|noicon|qid|2 | alt | birth_date | birth_name | birth_place | burial_date | burial_place | caption | clan_name | consort | cor-type | cor-type1 | cor-type2 | cor-type3 | cor-type4 | cor-type5 | cor-type6 | cor-type7 | cor-type8 | cor-type9 | coronation | coronation1 | coronation2 | coronation3 | coronation4 | coronation5 | coronation6 | coronation7 | coronation8 | coronation9 | date of burial | death_date | death_place | dynasty | embed | era dates | era name | family_name | father | full name | given_name | house | house-type | image | image_size | investiture | issue | issue-link | issue-pipe | issue-type | module | more | moretext | moretext1 | moretext2 | moretext3 | moretext4 | moretext5 | moretext6 | moretext7 | moretext8 | moretext9 | mother | name | native_lang1 | native_lang1_name1 | native_lang2 | native_lang2_name1 | native_lang3 | native_lang3_name1 | native_lang4 | native_lang4_name1 | native_lang5 | native_lang5_name1 | occupation | place of burial | posthumous name | pre-type | pre-type1 | pre-type2 | pre-type3 | pre-type4 | pre-type5 | pre-type6 | pre-type7 | pre-type8 | pre-type9 | predecessor | predecessor1 | predecessor2 | predecessor3 | predecessor4 | predecessor5 | predecessor6 | predecessor7 | predecessor8 | predecessor9 | queen | reg-type | reg-type1 | reg-type2 | reg-type3 | reg-type4 | reg-type5 | reg-type6 | reg-type7 | reg-type8 | reg-type9 | regent | regent1 | regent2 | regent3 | regent4 | regent5 | regent6 | regent7 | regent8 | regent9 | regnal name | reign | reign-type | reign-type1 | reign-type2 | reign-type3 | reign-type4 | reign-type5 | reign-type6 | reign-type7 | reign-type8 | reign-type9 | reign1 | reign2 | reign3 | reign4 | reign5 | reign6 | reign7 | reign8 | reign9 | religion | royal house | signature | signature_alt | signature_type | spouse | spouse 1 | spouse 2 | spouse 3 | spouse 4 | spouse 5 | spouse 6 | spouse 7 | spouse 8 | spouse 9 | spouse-type | spouses | spouses-type | suc-type | suc-type1 | suc-type2 | suc-type3 | suc-type4 | suc-type5 | suc-type6 | suc-type7 | suc-type8 | suc-type9 | succession | succession1 | succession2 | succession3 | succession4 | succession5 | succession6 | succession7 | succession8 | succession9 | successor | successor1 | successor2 | successor3 | successor4 | successor5 | successor6 | successor7 | successor8 | successor9 | temple name | title | titletext | type}}
+
{{#invoke:check for unknown parameters|check|unknown=[[Category:Pages using wikidata infoboxes with additional parameters|_VALUE_]]|preview=unknown parameter "_VALUE_"|fetchwikidata|suppressfields|onlysourced|noicon|qid|2 | alt | birth_date | birth_name | birth_place | burial_date | burial_place | caption | clan_name | consort | cor-type | cor-type1 | cor-type2 | cor-type3 | cor-type4 | cor-type5 | cor-type6 | cor-type7 | cor-type8 | cor-type9 | coronation | coronation1 | coronation2 | coronation3 | coronation4 | coronation5 | coronation6 | coronation7 | coronation8 | coronation9 | date of burial | death_date | death_place | dynasty | embed | era dates | era name | family_name | father | full name | given_name | house | house-type | image | image_size | investiture | issue | issue-link | issue-pipe | issue-type | module | more | moretext | moretext1 | moretext2 | moretext3 | moretext4 | moretext5 | moretext6 | moretext7 | moretext8 | moretext9 | mother | name | native_lang1 | native_lang1_name1 | native_lang2 | native_lang2_name1 | native_lang3 | native_lang3_name1 | native_lang4 | native_lang4_name1 | native_lang5 | native_lang5_name1 | occupation | place of burial | posthumous name | pre-type | pre-type1 | pre-type2 | pre-type3 | pre-type4 | pre-type5 | pre-type6 | pre-type7 | pre-type8 | pre-type9 | predecessor | predecessor1 | predecessor2 | predecessor3 | predecessor4 | predecessor5 | predecessor6 | predecessor7 | predecessor8 | predecessor9 | queen | reg-type | reg-type1 | reg-type2 | reg-type3 | reg-type4 | reg-type5 | reg-type6 | reg-type7 | reg-type8 | reg-type9 | regent | regent1 | regent2 | regent3 | regent4 | regent5 | regent6 | regent7 | regent8 | regent9 | regnal name | reign | reign-type | reign-type1 | reign-type2 | reign-type3 | reign-type4 | reign-type5 | reign-type6 | reign-type7 | reign-type8 | reign-type9 | reign1 | reign2 | reign3 | reign4 | reign5 | reign6 | reign7 | reign8 | reign9 | religion | royal house | signature | signature_alt | signature_type | spouse | spouse 1 | spouse 2 | spouse 3 | spouse 4 | spouse 5 | spouse 6 | spouse 7 | spouse 8 | spouse 9 | spouse-type | spouses | spouses-type | suc-type | suc-type1 | suc-type2 | suc-type3 | suc-type4 | suc-type5 | suc-type6 | suc-type7 | suc-type8 | suc-type9 | succession | succession1 | succession2 | succession3 | succession4 | succession5 | succession6 | succession7 | succession8 | succession9 | successor | successor1 | successor2 | successor3 | successor4 | successor5 | successor6 | successor7 | successor8 | successor9 | temple name | title | titletext | type | resting_place}}
 
{{#if:{{{fetchwikidata|ALL}}}|[[Category:Wikidata testcases for infobox royalty]]}}
 
{{#if:{{{fetchwikidata|ALL}}}|[[Category:Wikidata testcases for infobox royalty]]}}
 
<noinclude>{{Documentation}}</noinclude>
 
<noinclude>{{Documentation}}</noinclude>

Revision as of 07:38, 1 April 2019

Template:PAGENAMEBASE
SpouseScript error: No such module "If empty".
WebsiteScript error: No such module "If empty".
Template documentation[view] [edit] [history] [purge]

Template:Person infobox header

This template may be used to summarize information about a person who is connected to royalty.

Usage

{{ Infobox royalty/Wikidata
| fetchwikidata=ALL
| onlysourced=no
}}

Parameters

Wikidata-specific parameters
Parameter Effect
fetchwikidata allows a golist of fields that may be imported from Wikidata; set to "ALL" for all fields; defaults to none
suppressfields allows a stoplist of fields that may be displayed in this infobox; overrides golist; 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
noicon should the pencils be shown; false means they should, default is they should not ("on")
qid Wikidata ID

In addition to the parameters above, any of the parameters from {{Infobox royalty}} can also be specified.

Tracking categories

Template:Wikidata infoboxes