Template:PersonRole: Difference between revisions

From TITAF TANGOWIKI
No edit summary
No edit summary
 
(5 intermediate revisions by one other user not shown)
Line 2: Line 2:
{{#template_params:PersonRole (label=Role;property=PersonRole)|PersonRoleOrchestra (label=Orchestra;property=PersonRoleOrchestra)|PersonRoleFrom (label=From;property=PersonRoleFrom)|PersonRoleTo (label=To;property=PersonRoleTo)}}
{{#template_params:PersonRole (label=Role;property=PersonRole)|PersonRoleOrchestra (label=Orchestra;property=PersonRoleOrchestra)|PersonRoleFrom (label=From;property=PersonRoleFrom)|PersonRoleTo (label=To;property=PersonRoleTo)}}
</noinclude><includeonly>
</noinclude><includeonly>
* [[PersonRole::{{{PersonRole|}}}]] from [[PersonRoleFrom::{{{PersonRoleFrom|}}}]] to [[PersonRoleTo::{{{PersonRoleTo|}}}]] at [[PersonRoleOrchestra::{{{PersonRoleOrchestra|}}}]
 
<--{| class="wikitable"
<!-- Manually entered roles -->
! Role
* [[PersonRole::{{{PersonRole|}}}]]
| [[PersonRole::{{{PersonRole|}}}]]
* [[PersonRoleOrchestra::{{{PersonRoleOrchestra|}}}]]
|-
* [[PersonRoleFrom::{{{PersonRoleFrom|}}}]]
! Orchestra
* [[PersonRoleTo::{{{PersonRoleTo|}}}]]
| [[PersonRoleOrchestra::{{{PersonRoleOrchestra|}}}]]
 
|-
<!-- Fetch data from Wikidata if Wikidata_ID is available -->
! From
{{#if:{{{Wikidata_ID|}}}|
| [[PersonRoleFrom::{{{PersonRoleFrom|}}}]]
  {{#get_web_data:
|-
    url=https://www.wikidata.org/w/api.php?action=wbgetentities&ids={{{Wikidata_ID}}}&format=json;
! To
    format=json;
| [[PersonRoleTo::{{{PersonRoleTo|}}}]]
    data=role=entities.{{{Wikidata_ID}}}.claims.P106.0.mainsnak.datavalue.value.id,
|}-->
          orchestra=entities.{{{Wikidata_ID}}}.claims.P463.0.mainsnak.datavalue.value.id
  }}
 
  * Wikidata Role: [[PersonRole::{{#external_value:role}}]]
  * Wikidata Orchestra: [[PersonRoleOrchestra::{{#external_value:orchestra}}]]
}}
 
</includeonly>
</includeonly>
<noinclude>[[Category:PersonClass]]</noinclude>
<noinclude>[[Category:PersonClass]]</noinclude>

Latest revision as of 15:26, 18 March 2025

This is the "PersonRole" template.

It should be called in the following format:

{{PersonRole
|PersonRole=
|PersonRoleOrchestra=
|PersonRoleFrom=
|PersonRoleTo=
}}

Edit the page to see the template text.