Template:PersonCall: Difference between revisions

From Bodhicitta
(VSCode edit)
(VSCode edit)
 
(11 intermediate revisions by the same user not shown)
Line 14: Line 14:
}}
}}
}}
}}
<div class="d-flex justify-content-center mt-5 mb-3">{{#ifsysop:{{PersonPageRemoteEditLink}}|}}</div>
<!-- Admin links are gated client-side (see .tws-group-only in tws.js/tws.main.scss).
    The ifsysop parser function previously used here made this page's output
    user-dependent, which disabled the parser cache entirely — forcing a full
    re-parse, including the remote Commons fetch, on every single page view. -->
<div class="tws-group-only" data-group="sysop"><div class="d-flex justify-content-center mt-5 mb-3">{{PersonPageRemoteEditLink}}</div></div>




<div class="row ssb-content">
<!--
<div class="ssb col-md-3 order-md-last sliding-drawer">
Full width, no sidebar.
<div class="sidebar ssb__inner my-5">
 
<div class="font-serif-alt text-110">{{#ask:[[{{PAGENAME}}]][[PersonType::+]]
NOTE — avoid colons inside these comment blocks. SMW's RemoteRequest.php
|?PersonType
runs a colon-split over every HTML comment it finds in a remote query
|format=template |template=DisplayPersonTypes |link=none |valuesep=;
response, so a colon here produces PHP warnings during rebuildData runs.
|intro=<div class="mt-3 mb-2 text-center text-110 font-weight-bold">Categories</div>
 
}}{{#arraymap:{{#ask:[[{{PAGENAME}}]][[Languagetranslation::+]]
The page used to run a 3/9 split with relations and categories in a sticky
|?Languagetranslation
rail. Measured across all 1,695 person pages, that rail held a median of TWO
|link=none |valuesep=; |mainlabel=- |headers=hide |import-annotation=true
items. 82% of pages carried 1-3, and only 1.2% carried 15 or more. Four out
}}
of five pages were paying for a sticky-sidebar instance, a mobile drawer, and
|;
a narrowed article column in order to show about two links.
|@@@
 
|<div class="ml-3 my-1">[[:Category:Translators of @@@|Translator of @@@]]</div>
A sidebar also earns its keep elsewhere on this wiki by holding things a
|;
reader returns to while moving through long content, such as a TOC or chapter
}}{{#ask:[[{{PAGENAME}}]][[EmanationOf::+]]
navigation. Person pages have no such content, only a short biography and
|?EmanationOf
then tiles. Names and relationships are attributes OF the subject, so they
|format=template |template=DisplayRelPeople |link=none |valuesep=;
now read in sequence with it rather than in a parallel column.
|intro=<div class="mt-3 mb-2 text-center text-110 font-weight-bold">Emantation of</div>
 
}}{{#ask:[[{{PAGENAME}}]][[Studentof::+]]
Reading order is deliberate. Who they are, what they looked like and their
|?Studentof
life, who they were connected to, then what they made. The works queries come
|format=template |template=DisplayRelPeople |link=none |valuesep=;
last because they run deep on well-covered figures, and they are the point of
|intro=<div class="mt-3 mb-2 text-center text-110 font-weight-bold">Student of</div>
the page.
}}{{#ask:[[{{PAGENAME}}]][[Teacherof::+]]
-->{{#ask:[[{{SUBPAGENAME}}]]
|?Teacherof
|?BdrcLink |?Bio |?BiographicalInfo |?BioTib |?BnwShortPersonBio |?FirstImage |?HarLinkRaw |?HasDnzPage |?HasRtzPage |?ImagesRaw |?MainNameChi |?MainNameDev |?MainNameJap |?MainNameKor |?MainNamePhon |?MainNameTib |?TolExcerpt |?TolLinkRaw |?Yearbirth |?Yeardeath |?Subclass |?GyatsaBioTib |?AltNamesTib |?AltNamesWylie |?AltNamesOther |?PersonType |?Languagetranslation |?EmanationOf |?Studentof |?Teacherof
|format=template |template=DisplayRelPeople |link=none |valuesep=;
|intro=<div class="mt-3 mb-2 text-center text-110 font-weight-bold">Teacher of</div>
}}<!-- {{#ask:[[{{PAGENAME}}]][[AltNamesTib::+]]
OR[[{{PAGENAME}}]][[AltNamesWylie::+]]
OR[[{{PAGENAME}}]][[AltNamesOther::+]]
OR[[{{PAGENAME}}]][[GyatsaNameWylie::+]]
|?AltNamesTib |?AltNamesWylie |?AltNamesOther |?GyatsaNameWylie
|named args=true |format=template |template=DisplayAltNames |link=none |valuesep=;
|intro=<div class="mt-3 mb-2 text-center text-110 font-weight-bold">Other Names</div>
}} -->
</div>
</div>
</div>
<div class="col-md-9">{{#ask:[[{{SUBPAGENAME}}]]
|?BdrcLink |?Bio |?BiographicalInfo |?BioTib |?BnwShortPersonBio |?Description |?FirstImage |?HarLinkRaw |?HasDnzPage |?HasRtzPage |?ImagesRaw |?MainNameChi |?MainNameDev |?MainNameJap |?MainNameKor |?MainNamePhon |?MainNameTib |?TolExcerpt |?TolLinkRaw |?Yearbirth |?Yeardeath |?Subclass |?GyatsaBioTib
|named args=true
|named args=true
|link=none
|link=none
Line 62: Line 51:
|format=template
|format=template
|template=PersonRemote
|template=PersonRemote
}}
}}<!--
<div class="my-4">{{#ifexpr:{{#ask:[[Category:Library Items||Editorial Content]][[Category:{{#titleparts:{{SUBPAGENAME}}}}]]
The Names and Connections band is rendered by the PersonRemote template on
Commons, from the printouts requested above. It used to be six local ask
queries here, which both duplicated data that arrives in the remote fetch
anyway and depended on SetRemoteValues having imported it.
-->
<div class="my-4"><!--
One filter box for the whole page, sitting above every section.
 
It is deliberately NOT per-section, because the handler in tws.js binds to every
.filter-input on the page, and an input with no contentId targets
.filterableContent globally — so one box per section would have each box
filtering all the other sections too. A single box matches that behaviour
honestly, and for most people the combined list is short anyway.
 
Shown only once the page total passes 7, so short pages stay uncluttered.
-->{{#ifexpr:{{#ask:{{#if: {{{ overrideAuthoredWorks | }}}{{{ overrideTranslatoredWorks | }}}
|[[{{#arraymap: {{{ overrideAuthoredWorks | }}};{{{ overrideTranslatoredWorks | }}} |;|@@@|@@@|{{!}}{{!}}}}]]
|[[Category:Library Items||Editorial Content]][[Category:{{#titleparts:{{SUBPAGENAME}}}}]]
OR[[Category:Library Items||Editorial Content]][[PeopleTopics::{{#titleparts:{{SUBPAGENAME}}}}]]
OR[[Category:Library Items||Editorial Content]][[PeopleTopics::{{#titleparts:{{SUBPAGENAME}}}}]]
OR[[Category:Library Items||Editorial Content]][[Performer::{{#titleparts:{{SUBPAGENAME}}}}]]
OR[[Category:Library Items||Editorial Content]][[Performer::{{#titleparts:{{SUBPAGENAME}}}}]]
|format=count}}>7|
OR[[-AssociatedArticle::<q>[[Category:Tsadra Bodhicitta Audio]][[AudioPerformerName::{{#titleparts:{{SUBPAGENAME}}}}]]</q>]]
}}|format=count}}>7|<div class="row mb-5 justify-content-center">
<div class="col-md-8 col-lg-6">{{#widget:filterInput|placeholder=Filter all contributions...}}</div>
</div>|}}{{#if: {{{ overrideAuthoredWorks | }}}{{{ overrideTranslatoredWorks | }}}
<!--
OVERRIDE PATH — an explicit work list was passed in, so relationship
buckets do not apply. Render the given list as a single section.
--> |{{PersonWorksSection
|heading=Works &amp; Contributions
|query=[[{{#arraymap: {{{ overrideAuthoredWorks | }}};{{{ overrideTranslatoredWorks | }}} |;|@@@|@@@|{{!}}{{!}}}}]]
}}
<!--
HYBRID PATH — split the works by how this person relates to them, so a
reader can tell an authored text from a recording they narrated.
 
The buckets have to be mutually exclusive, because the underlying data
overlaps, because an item with |Performer= is ALSO auto-categorised under the
performer's name. Splitting naively double-renders those tiles — measured on
People/Ringu Tulku, 303 "authored" + 294 "performer" for a true union of 303.


<div class="row mb-4">
They are separated on |Class= rather than by negating |Performer=, for two
<div class="col-md-8 col-lg-6">{{#widget:filterInput|placeholder=Filter {{#ask:{{#if: {{{ overrideAuthoredWorks | }}}{{{ overrideTranslatoredWorks | }}}
reasons. First, SMW's negation operators do not do set subtraction here.
|[[{{#arraymap: {{{ overrideAuthoredWorks | }}};{{{ overrideTranslatoredWorks | }}} |;|@@@|@@@|{{!}}{{!}}}}]]
A negated Performer condition excludes pages that LACK the property entirely, which
|[[Category:Library Items||Editorial Content]][[Category:{{#titleparts:{{SUBPAGENAME}}}}]]
silently drops every text work (it zeroed out Śāntideva's 181 works in
OR[[Category:Library Items||Editorial Content]][[PeopleTopics::{{#titleparts:{{SUBPAGENAME}}}}]]
testing), and a negated Category condition was ignored outright. Second, Class is a
OR[[Category:Library Items||Editorial Content]][[Performer::{{#titleparts:{{SUBPAGENAME}}}}]]
reliable positive discriminator — every one of the 1,732 library items
}}
carrying a Performer value is Class=Multimedia, with no exceptions.
|format=count
 
}} contributions...}}</div>
So Multimedia is the performance bucket, and everything else is authorship.
</div> |
Positive conditions only, no negation.
}}
 
{{TileQuery
Each section renders nothing when its query is empty, so the common case —
|query={{#if: {{{ overrideAuthoredWorks | }}}{{{ overrideTranslatoredWorks | }}}
a person with only authored works — still shows exactly one section.
|[[{{#arraymap: {{{ overrideAuthoredWorks | }}};{{{ overrideTranslatoredWorks | }}} |;|@@@|@@@|{{!}}{{!}}}}]]
--> |{{PersonWorksSection
|[[Category:Library Items||Editorial Content]][[Category:{{#titleparts:{{SUBPAGENAME}}}}]]
|heading=Authored &amp; Translated Works
OR[[Category:Library Items||Editorial Content]][[Category:{{#titleparts:{{PAGENAME}}}}]]
|blurb=Library items authored or translated by {{#show:{{PAGENAME}}|?MainNamePhon}}.
|query=[[Category:Library Items||Editorial Content]][[Category:{{#titleparts:{{SUBPAGENAME}}}}]][[Class::Books||Articles||Classical Works||Dissertations||Tibetan Publications||Sanskrit Publications||Other Classical Publications||Editorial Content]]
}}{{PersonWorksSection
|heading=Performances &amp; Recordings
|blurb=Media in which {{#show:{{PAGENAME}}|?MainNamePhon}} appears as performer or teacher.
|query=[[Category:Library Items||Editorial Content]][[Performer::{{#titleparts:{{SUBPAGENAME}}}}]][[Volumenumber::<1]]
}}{{PersonWorksSection
|heading=Narrated Audio
|blurb=Audio recordings narrated by {{#show:{{PAGENAME}}|?MainNamePhon}}.
|query=[[-AssociatedArticle::<q>[[Category:Tsadra Bodhicitta Audio]][[AudioPerformerName::{{#titleparts:{{SUBPAGENAME}}}}]]</q>]]
}}{{PersonWorksSection
|heading=Works About {{#show:{{PAGENAME}}|?MainNamePhon}}
|blurb=Scholarship and editorial content in which this person is a subject rather than an author.
|query=[[Category:Library Items||Editorial Content]][[PeopleTopics::{{#titleparts:{{SUBPAGENAME}}}}]]
}}
<!--
Fallback for when nothing matched any bucket. Preserves the original empty state.
--> {{#ifexpr:{{#ask:[[Category:Library Items||Editorial Content]][[Category:{{#titleparts:{{SUBPAGENAME}}}}]]
OR[[Category:Library Items||Editorial Content]][[PeopleTopics::{{#titleparts:{{SUBPAGENAME}}}}]]
OR[[Category:Library Items||Editorial Content]][[PeopleTopics::{{#titleparts:{{SUBPAGENAME}}}}]]
OR[[Category:Library Items||Editorial Content]][[Performer::{{#titleparts:{{SUBPAGENAME}}}}]]
OR[[Category:Library Items||Editorial Content]][[Performer::{{#titleparts:{{SUBPAGENAME}}}}]]
OR[[-AssociatedArticle::<q>[[Category:Tsadra Bodhicitta Audio]][[AudioPerformerName::{{#titleparts:{{SUBPAGENAME}}}}]]</q>]]
|format=count}}>0||<div class="h4 red-header">There are no works associated with this person.</div>
}}
}}
|classes=col-md-6 mb-3 mb-lg-4
|default=<div class="h4 red-header">There are no works associated with this person.</div>
|limit=108
|intro=<div class="row filterableContent">
|outro=</div>
|searchlabel=<div class="h5 red-header text-center">More results <i class="fa-duotone fa-arrow-up-right ml-1"></i></div>
}}
}}
</div>
</div>
</div>
</div>


{{#arraymap:{{#titleparts:{{SUBPAGENAME}} }};{{#arraymap:{{#ask:[[{{PAGENAME}}]][[Languagetranslation::+]]
{{#arraymap:{{#titleparts:{{SUBPAGENAME}} }};{{#arraymap:{{#ask:[[{{PAGENAME}}]][[Languagetranslation::+]]
Line 109: Line 143:
}};{{#arraymap:{{#show:{{PAGENAME}}|?PersonType}}|,|@@@|@@@|;}};People
}};{{#arraymap:{{#show:{{PAGENAME}}|?PersonType}}|,|@@@|@@@|;}};People
|;|@@@|[[Category:@@@]]|
|;|@@@|[[Category:@@@]]|
}}{{SetRemoteValues
}}<!--
Single remote fetch for every imported property.
 
This was previously two {{SetRemoteValues}} calls — and therefore two HTTP
round trips to Commons per page view — purely because |sep= applied to every
property in a batch indiscriminately, so multi-valued props had to be
separated from single-valued ones.
 
The GetData module now takes |multi=, an allowlist of the properties that should
receive SMW's '+sep=' directive. Everything else in |props= is stored as a
single value, so both groups can travel in one query.
-->{{SetRemoteValues
|source=commons
|source=commons
|props=HarLinkRaw;HasDnzPage;HasRtzPage;MainNameChi;MainNameDev;MainNameJap;MainNameKor;MainNamePhon;MainNameTib;TolLinkRaw;BdrcLink;AltNamesTib;AltNamesOther;AltNamesWylie;GyatsaNameWylie;PersonType;EmanationOf;Studentof;Teacherof;Languagetranslation;Subclass
|props=HarLinkRaw;HasDnzPage;HasRtzPage;MainNameChi;MainNameDev;MainNameJap;MainNameKor;MainNamePhon;MainNameTib;TolLinkRaw;BdrcLink;AltNamesTib;AltNamesOther;AltNamesWylie;GyatsaNameWylie;PersonType;EmanationOf;Studentof;Teacherof;Languagetranslation;Subclass;Bio;BiographicalInfo;BioTib;BnwShortPersonBio;Bornin;Classification;DatesNotes;Description;ImagesRaw;TibDateAnimal;TibDateDay;TibDateDeathAnimal;TibDateDeathDay;TibDateDeathElement;TibDateDeathGender;TibDateDeathMonth;TibDateDeathRabjung;TibDateElement;TibDateGender;TibDateMonth;TibDateRabjung;TolExcerpt;Yearbirth;Yeardeath;FirstImage;SortName;Namefirst;Namelast;MainNameWylie;GyatsaBioTib
|sep=;
|sep=;
}}{{SetRemoteValues
|multi=HarLinkRaw;HasDnzPage;HasRtzPage;MainNameChi;MainNameDev;MainNameJap;MainNameKor;MainNamePhon;MainNameTib;TolLinkRaw;BdrcLink;AltNamesTib;AltNamesOther;AltNamesWylie;GyatsaNameWylie;PersonType;EmanationOf;Studentof;Teacherof;Languagetranslation;Subclass
|source=commons
|props=Bio;BiographicalInfo;BioTib;BnwShortPersonBio;Bornin;Classification;DatesNotes;Description;ImagesRaw;TibDateAnimal;TibDateDay;TibDateDeathAnimal;TibDateDeathDay;TibDateDeathElement;TibDateDeathGender;TibDateDeathMonth;TibDateDeathRabjung;TibDateElement;TibDateGender;TibDateMonth;TibDateRabjung;TolExcerpt;Yearbirth;Yeardeath;FirstImage;SortName;Namefirst;Namelast;MainNameWylie;GyatsaBioTib
}}{{#set:
}}{{#set:
|CreateRedirectNow={{#arraymap:{{#show:{{PAGENAME}}|?MainNamePhon}};{{#titleparts:{{SUBPAGENAME}} }}
|CreateRedirectNow={{#arraymap:{{#show:{{PAGENAME}}|?MainNamePhon}};{{#titleparts:{{SUBPAGENAME}} }}

Latest revision as of 21:42, 13 August 2026