Template:PersonCall: Difference between revisions

From Bodhicitta
(VSCode edit)
(VSCode edit)
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>




Line 63: Line 67:
|template=PersonRemote
|template=PersonRemote
}}
}}
<div class="my-4">{{#ifexpr:{{#ask:[[Category:Library Items||Editorial Content]][[Category:{{#titleparts:{{SUBPAGENAME}}}}]]
<div class="my-4">{{#if: {{{ overrideAuthoredWorks | }}}{{{ overrideTranslatoredWorks | }}}
OR[[Category:Library Items||Editorial Content]][[PeopleTopics::{{#titleparts:{{SUBPAGENAME}}}}]]
<!--
OR[[Category:Library Items||Editorial Content]][[Performer::{{#titleparts:{{SUBPAGENAME}}}}]]
OVERRIDE PATH — an explicit work list was passed in, so relationship
|format=count}}>7|
buckets do not apply. Render the given list as a single section.
--> |{{PersonWorksSection
|heading=Works &amp; Contributions
|noun=works
|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.


<div class="row mb-4">
The buckets have to be mutually exclusive, because the underlying data
<div class="col-md-8 col-lg-6">{{#widget:filterInput|placeholder=Filter {{#ask:{{#if: {{{ overrideAuthoredWorks | }}}{{{ overrideTranslatoredWorks | }}}
overlaps: an item with |Performer= is ALSO auto-categorised under the
|[[{{#arraymap: {{{ overrideAuthoredWorks | }}};{{{ overrideTranslatoredWorks | }}} |;|@@@|@@@|{{!}}{{!}}}}]]
performer's name. Splitting naively double-renders those tiles — measured on
|[[Category:Library Items||Editorial Content]][[Category:{{#titleparts:{{SUBPAGENAME}}}}]]
People/Ringu Tulku, 303 "authored" + 294 "performer" for a true union of 303.
OR[[Category:Library Items||Editorial Content]][[PeopleTopics::{{#titleparts:{{SUBPAGENAME}}}}]]
 
OR[[Category:Library Items||Editorial Content]][[Performer::{{#titleparts:{{SUBPAGENAME}}}}]]
They are separated on |Class= rather than by negating |Performer=, for two
}}
reasons. First, SMW's negation operators do not do set subtraction here:
|format=count
[[Performer::!X]] excludes pages that LACK the property entirely, which
}} contributions...}}</div>
silently drops every text work (it zeroed out Śāntideva's 181 works in
</div> |
testing), and [[Category:!X]] was ignored outright. Second, Class is a
}}
reliable positive discriminator — every one of the 1,732 library items
{{TileQuery
carrying a Performer value is Class=Multimedia, with no exceptions.
|query={{#if: {{{ overrideAuthoredWorks | }}}{{{ overrideTranslatoredWorks | }}}
 
|[[{{#arraymap: {{{ overrideAuthoredWorks | }}};{{{ overrideTranslatoredWorks | }}} |;|@@@|@@@|{{!}}{{!}}}}]]
So: Multimedia is the performance bucket, everything else is authorship.
|[[Category:Library Items||Editorial Content]][[Category:{{#titleparts:{{SUBPAGENAME}}}}]]
Positive conditions only, no negation.
OR[[Category:Library Items||Editorial Content]][[Category:{{#titleparts:{{PAGENAME}}}}]]
 
Each section renders nothing when its query is empty, so the common case —
a person with only authored works — still shows exactly one section.
--> |{{PersonWorksSection
|heading=Authored Works
|noun=works
|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.
|noun=recordings
|query=[[Category:Library Items||Editorial Content]][[Performer::{{#titleparts:{{SUBPAGENAME}}}}]]
}}{{PersonWorksSection
|heading=Narrated Audio
|blurb=Audio recordings narrated by {{#show:{{PAGENAME}}|?MainNamePhon}}.
|noun=recordings
|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.
|noun=works
|query=[[Category:Library Items||Editorial Content]][[PeopleTopics::{{#titleparts:{{SUBPAGENAME}}}}]]
}}
<!--
Fallback: nothing matched any bucket. Preserves the original empty-state message.
--> {{#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>]]
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>
Line 110: Line 142:
}};{{#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.
 
Module:GetData 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}} }}

Revision as of 15:43, 13 August 2026