Template:Infobox place/people: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>{{Semantic display template|Place/person}}
{{#arraymaptemplate:{{#ask: [[-Has subobject::Colour Code Printing]][[Category:People]][[With role::true]]|?Has name|mainlabel=-|headers=hide|format=plainlist}}|,|Infobox place/people/with role}}
This is a helper template for [[Template:Infobox place]], it sorts and displays the row(s) needed to display the people listed for a place (which are stored as subobjects).


== Behavior ==


{{#ask: [[-Has subobject::Colour Code Printing]][[Category:People]][[With role::false]]|?Has name|mainlabel=-|headers=hide|format=plainlist}}
Multiple people can be listed for a place, and each has an optional [[Property:Has role]]. A helper [[Property:With role]] is used as a boolean flag to filter people with and without roles. Additionally, each person has an optional URL (for a personal site or profile) which turns their name into an external link.
</noinclude><includeonly></includeonly>
 
The list displays in two sections:
 
# People who have assigned roles are displayed first, one per role, with the role used as a label. Roles are not unique, people could be assigned the same role, in which case they will ''each'' be displayed as a row with that label (e.g. two people listed with the role of "Co-founder" would display as two separate rows).
# People who have no assigned label are grouped together into one row with "People" as the label.
 
{| class="wikitable"
! [[Property:Has name|Has name]] !! [[Property:Has role|Has role]] !! [[Property:With role|With role]] !! [[Property:Has URL|Has URL]]
|-
| Corita Kent || Founder || true || https://www.corita.org/
|-
| Robert Blackburn || || false || https://www.rbpmw-efanyc.org/
|-
| Joseph Beuys || || false ||
|-
| Anni Albers || Resident || true ||
|-
| Donald Ewin Cooke || Resident || true ||
|-
| Noboru Hayama || || false ||
|}
 
{| class="infobox"
! Founder
| [https://www.corita.org/ Corita Kent]
|-
! Resident
| Anni Albers
|-
! Resident
| Donald Ewin Cooke
|-
! People
| <div>[https://www.rbpmw-efanyc.org/ Robert Blackburn]</div><div>Joseph Beuys</div><div>Noboru Hayama</div>
|}
 
=== Subtemplates ===
The handling of each individual person + their link (and whether they are wrapped in a <code><nowiki><td/></nowiki></code> or <code><nowiki><div/></nowiki></code>) is managed in a subtemplate: [[Template:Infobox place/people/person]]
 
</noinclude><includeonly>{{#arraymaptemplate:{{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:People]][[With role::true]]|?Has name|mainlabel=-|headers=hide|format=plainlist}}|Infobox place/people/person|,|}}
{{#ifexpr:{{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:People]][[With role::false]]|format=count}}>0|<tr><th>People</th><td>{{#arraymaptemplate:{{#ask:[[-Has subobject::{{PAGENAME}}]][[Category:People]][[With role::false]]|?Has name|mainlabel=-|headers=hide|format=plainlist}}|Infobox place/people/person|,|}}</td></tr>}}</includeonly>

Latest revision as of 03:40, 18 December 2024

This is a semantic display template, it takes no properties of its own. The annotations it uses are made in Template:Place/person.

This is a helper template for Template:Infobox place, it sorts and displays the row(s) needed to display the people listed for a place (which are stored as subobjects).

Behavior

Multiple people can be listed for a place, and each has an optional Property:Has role. A helper Property:With role is used as a boolean flag to filter people with and without roles. Additionally, each person has an optional URL (for a personal site or profile) which turns their name into an external link.

The list displays in two sections:

  1. People who have assigned roles are displayed first, one per role, with the role used as a label. Roles are not unique, people could be assigned the same role, in which case they will each be displayed as a row with that label (e.g. two people listed with the role of "Co-founder" would display as two separate rows).
  2. People who have no assigned label are grouped together into one row with "People" as the label.
Has name Has role With role Has URL
Corita Kent Founder true https://www.corita.org/
Robert Blackburn false https://www.rbpmw-efanyc.org/
Joseph Beuys false
Anni Albers Resident true
Donald Ewin Cooke Resident true
Noboru Hayama false
Founder Corita Kent
Resident Anni Albers
Resident Donald Ewin Cooke
People
Joseph Beuys
Noboru Hayama

Subtemplates

The handling of each individual person + their link (and whether they are wrapped in a <td/> or <div/>) is managed in a subtemplate: Template:Infobox place/people/person