Difference between revisions of "Template:Person"

From Shangpa Resource Center
 
(73 intermediate revisions by the same user not shown)
Line 18: Line 18:
 
|Associated lineages=
 
|Associated lineages=
 
|Links=
 
|Links=
 +
|PersonClassification=
 
}}
 
}}
 
</pre>
 
</pre>
 
Edit the page to see the template text.
 
Edit the page to see the template text.
</noinclude><includeonly>
+
</noinclude><includeonly>__NOTOC__
 
{{#set:PersonID={{{PersonID|}}}}}
 
{{#set:PersonID={{{PersonID|}}}}}
 
{{#set:DateOfBirth={{{Date of Birth|}}}}}
 
{{#set:DateOfBirth={{{Date of Birth|}}}}}
 
{{#set:DateOfDeath={{{Date of Death|}}}}}
 
{{#set:DateOfDeath={{{Date of Death|}}}}}
{{#arraymap:{{{Name Variants|}}}|,|x|{{#set:NameVariants=x}}}}  
+
{{#arraymap:{{{Name Variants|}}}|,|x|{{#set:NameVariants=x}}}}
 
{{#set:Notes={{{Notes|}}}}}
 
{{#set:Notes={{{Notes|}}}}}
{{#arraymap:{{{Teachers|}}}|,|x|{{#set:Teachers=x}}}}  
+
{{#arraymap:{{{Teachers|}}}|,|x|{{#set:Teachers=x}}}}
{{#arraymap:{{{Students|}}}|,|x|{{#set:Students=x}}}}  
+
{{#arraymap:{{{Students|}}}|,|x|{{#set:Students=x}}}}
 
{{#set:PlacesPrimarySeat={{{Primary seat|}}}}}
 
{{#set:PlacesPrimarySeat={{{Primary seat|}}}}}
 
{{#set:PlacesBirth={{{Place of birth|}}}}}
 
{{#set:PlacesBirth={{{Place of birth|}}}}}
 
{{#set:PlacesDeath={{{Place of death|}}}}}
 
{{#set:PlacesDeath={{{Place of death|}}}}}
{{#arraymap:{{{PlacesFoundedMonastery|}}}|,|x|{{#set:Monastery founded=x}}}}  
+
{{#arraymap:{{{Monastery founded|}}}|,|x|{{#set:Monastery founded=x}}}}
{{#arraymap:{{{Associated lineages|}}}|,|x|{{#set:AssociatedLineages=x}}}}  
+
{{#arraymap:{{{Associated lineages|}}}|,|x|{{#set:AssociatedLineages=x}}}}
{{#arraymap:{{{Links|}}}|,|x|{{#set:Links=x}}}}  
+
{{#arraymap:{{{Links|}}}|,|x|{{#set:Links=x}}}}
{| class="wikitable"
+
{{#set:PersonClassification={{{PersonClassification|}}}}}
! PersonID
+
<div class="text_left_column">
| [[PersonID::{{{PersonID|}}}]]
+
{| class="text_properties"
|-
+
! Resource ID
! Gender
+
| {{{PersonID|}}}
| [[Gender::{{{Gender|}}}]]
 
 
|-
 
|-
 
! Date of Birth
 
! Date of Birth
| [[DateOfBirth::{{{Date of Birth|}}}]]
+
| {{#if: {{{Date of Birth|}}} | {{{Date of Birth|}}} | Unknown }}
|-
 
 
! Date of Death
 
! Date of Death
| [[DateOfDeath::{{{Date of Death|}}}]]
+
| {{#if: {{{Date of Death|}}} | {{{Date of Death|}}} | Unknown }}
|-
 
! Name Variants
 
| {{#arraymap:{{{Name Variants|}}}|,|x|[[NameVariants::x]]}}
 
|-
 
! Notes
 
| [[Notes::{{{Notes|}}}]]
 
|-
 
! Teachers
 
| {{#arraymap:{{{Teachers|}}}|,|x|[[Teachers::x]]}}
 
|-
 
! Students
 
| {{#arraymap:{{{Students|}}}|,|x|[[Students::x]]}}
 
|-
 
! Primary seat
 
| [[PlacesPrimarySeat::{{{Primary seat|}}}]]
 
|-
 
! Place of birth
 
| [[PlacesBirth::{{{Place of birth|}}}]]
 
|-
 
! Place of death
 
| [[PlacesDeath::{{{Place of death|}}}]]
 
|-
 
! Monastery founded
 
| {{#arraymap:{{{Monastery founded|}}}|,|x|[[PlacesFoundedMonastery::x]]}}
 
 
|-
 
|-
! Associated lineages
+
{{#if: {{{Links|}}}| ! External links
| {{#arraymap:{{{Associated lineages|}}}|,|x|[[AssociatedLineages::x]]}}
+
{{!}} {{#arraymap:{{{Links|}}}|,|x|x|<br/>}} |}}
|-
 
! Links
 
| {{#arraymap:{{{Links|}}}|,|x|[[Links::x]]}}
 
 
|}
 
|}
 +
</div>
 +
{{#css:
 +
  .mw-parser-output {
 +
    display: flex;
 +
  }
 +
 +
  .firstHeading {
 +
    margin-left: 21%;
 +
}
 +
}}
 +
{{#arraydefine: MyTextAuthorArray
 +
|{{#ask: [[Author::{{BASEPAGENAME}}]] |headers=hide |link=none |limit=5000 }}
 +
|, | sort=asc, unique
 +
}}{{#arraydefine: MyTextAssociatedArray
 +
|{{#ask: [[AssociatedPerson::{{BASEPAGENAME}}]] |headers=hide |link=none |limit=5000 }}
 +
|, | sort=asc, unique
 +
}}<div class="text_right_column">
 +
{{#if: {{{Name Variants|}}} | <h2 class="h2_person">Name Variants</h2> {{#arraymap:{{{Name Variants|}}}|,|x|x|<br/>}} |}}{{#if: {{{Teachers|}}} | <h2 class="h2_person">Teachers</h2> {{#arraymap:{{{Teachers|}}}|,|x|[[x]]|<br/>}} |}}{{#if: {{{Students|}}} | <h2 class="h2_person">Students</h2> {{#arraymap:{{{Students|}}}|,|x|[[x]]|<br/>}} |}}
 +
{{#if: {{{Primary seat|}}}{{{Place of birth|}}}{{{Place of death|}}}{{{Monastery founded|}}} | <h2 class="h2_person">Associated Places</h2>
 +
<ul>{{#if: {{{Primary seat|}}} | <li>Primary seat: [[{{{Primary seat|}}}]] </li> |}}{{#if: {{{Place of birth|}}} | <li>Place of birth: [[{{{Place of birth|}}}]] </li> |}}{{#if: {{{Place of death|}}} | <li>Place of death: [[{{{Place of death|}}}]] </li> |}}{{#if: {{{Monastery founded|}}} | <li>Monastery founded: {{#arraymap:{{{Monastery founded|}}}|,|x|[[x]]}} </li> |}}
 +
</ul> |}}{{#ifexpr: {{#arraysize:MyTextAuthorArray}}+{{#arraysize:MyTextAssociatedArray}} = 0 ||<h2 class="h2_person">Associated works</h2>}}{{#ifeq: {{#arraysize:MyTextAuthorArray}} | 0 || <h3 class="h3_person">Author</h3><ul>{{#arrayprint: MyTextAuthorArray||@@@@|<li>[[@@@@]]</li> }}</ul> }}{{#ifeq: {{#arraysize:MyTextAssociatedArray}} | 0 || <h3 class="h3_person">Associated to work</h3><ul>{{#arrayprint: MyTextAssociatedArray||@@@@|<li>[[@@@@]]</li> }}</ul> }}
 +
{{#if: {{{Notes|}}}|<h2 class="h2_person">Notes</h2> {{{Notes|}}}|}}
 +
</div>
  
 
[[Category:Person]]
 
[[Category:Person]]
 
</includeonly>
 
</includeonly>

Latest revision as of 18:32, 9 June 2019

This is the "Person" template. It should be called in the following format:

{{Person
|PersonID=
|Gender=
|Date of Birth=
|Date of Death=
|Name Variants=
|Notes=
|Teachers=
|Students=
|Primary seat=
|Place of birth=
|Place of death=
|Monastery founded=
|Associated lineages=
|Links=
|PersonClassification=
}}

Edit the page to see the template text.