Template:Person: Difference between revisions
From TITAF TANGOWIKI
No edit summary |
No edit summary Tag: Manual revert |
||
| (8 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
<!--{{#template_params:NameFirst (label=First name (civil);property=PersonNameFirst)|NameMiddle (label=Middle name (civil);property=PersonNameMiddle)|NameNick (label=Nick name;property=PersonNameNick)|NameLast (label=Last name (civil);property=PersonNameLast)|NamePseudonym (label=Pseudonym;property=PersonNamePseudonym)|NameAlt (label=Alternative name;property=PersonNameAlt)|Role (list;property=PersonRole)|Country (label=Country of origin;property=PersonCountry)|DateBirth (label=Date of birth;property=PersonDateBirth)|DateDeath (label=Date of death;property=PersonDateDeath)}}--> | <!--{{#template_params:NameFirst (label=First name (civil);property=PersonNameFirst)|NameMiddle (label=Middle name (civil);property=PersonNameMiddle)|NameNick (label=Nick name;property=PersonNameNick)|NameLast (label=Last name (civil);property=PersonNameLast)|NamePseudonym (label=Pseudonym;property=PersonNamePseudonym)|NameAlt (label=Alternative name;property=PersonNameAlt)|Role (list;property=PersonRole)|Country (label=Country of origin;property=PersonCountry)|DateBirth (label=Date of birth;property=PersonDateBirth)|DateDeath (label=Date of death;property=PersonDateDeath)|Wikidata_ID (label=Wikidata ID;property=Wikidata_ID)}}--> | ||
</noinclude><includeonly> | </noinclude><includeonly> | ||
{{DISPLAYTITLE:{{{NameFirst}}}{{#if:{{{NameNick|}}}| ({{{NameNick}}})|}} {{{NameLast}}}}} | {{DISPLAYTITLE:{{{NameFirst}}}{{#if:{{{NameNick|}}}| ({{{NameNick}}})|}} {{{NameLast}}}}} | ||
{{DEFAULTSORT:{{{NameLast}}},{{{NameFirst}}}}} | {{DEFAULTSORT:{{{NameLast}}},{{{NameFirst}}}}} | ||
{| class="person" | {| class="person" | ||
! First name | ! First name | ||
| Line 37: | Line 39: | ||
! Date of death | ! Date of death | ||
| [[PersonDateDeath::{{{DateDeath|}}}]] | | [[PersonDateDeath::{{{DateDeath|}}}]] | ||
|- | |||
! Wikidata ID | |||
| [[Wikidata_ID::{{{Wikidata_ID|}}}]] | |||
|} | |} | ||
<!-- Fetch Data from Wikidata If Wikidata_ID is Provided --> | |||
{{#if:{{{Wikidata_ID|}}}| | |||
{{#get_web_data: | |||
url=https://www.wikidata.org/w/api.php?action=wbgetentities&ids={{{Wikidata_ID}}}&format=json; | |||
format=json; | |||
data=birthday=entities.{{{Wikidata_ID}}}.claims.P569.0.mainsnak.datavalue.value.time | |||
}} | |||
{{#set: PersonDateBirth={{#external_value:birthday}} }} | |||
* Wikidata Date of Birth: {{#external_value:birthday}} | |||
}} | |||
{{#if:{{{Wikidata_ID|}}}| | |||
{{#get_web_data: | |||
url=https://www.wikidata.org/w/api.php?action=wbgetentities&ids={{{Wikidata_ID}}}&format=json; | |||
format=json; | |||
data=full_response=entities.{{{Wikidata_ID}}} | |||
}} | |||
* Raw API Response: {{#external_value:full_response}} | |||
}} | |||
[[Category:Person]] | [[Category:Person]] | ||
</includeonly><noinclude>[[Category:PersonClass]]</noinclude> | </includeonly><noinclude>[[Category:PersonClass]]</noinclude> | ||