Template:LibraryItem: Difference between revisions

From Bodhicitta
(VSCode edit)
(Mobile: let the related-link / breadcrumb row wrap (it widened some item pages to 1181px on phones))
 
(6 intermediate revisions by the same user not shown)
Line 16: Line 16:
|TextTranslated={{{ TextTranslated | }}}
|TextTranslated={{{ TextTranslated | }}}
|SubPagename={{#show:{{PAGENAME}}|?Display title of#}}
|SubPagename={{#show:{{PAGENAME}}|?Display title of#}}
}}<div class="d-flex justify-content-between">
}}<div class="d-flex flex-wrap justify-content-between" style="gap:0 1rem">
<div>{{#ask:[[{{PAGENAME}}]]
<div>{{#ask:[[{{PAGENAME}}]]
[[Contains a full translation of::Texts/Bodhicaryāvatāra]]
[[Contains a full translation of::Texts/Bodhicaryāvatāra]]
Line 282: Line 282:
CITED IN THE ŚIKṢĀSAMUCCAYA
CITED IN THE ŚIKṢĀSAMUCCAYA


Renders only when this text is actually quoted in the SSC. The gate is the
Renders only when this page is actually quoted: at least one segment's
data itself: Module:SscCitations returns nothing unless the page carries a
QuoteSource names it. QuoteSource is a Page-type property, so the count is one
DrlPageName (an RKTS catalogue id, only set on canonical texts) that appears
cheap indexed lookup, and SMW resolves redirects on a page value, so a segment
in a QuoteSource on an SSC segment. No flag to maintain, and no list to keep
that named one of the text's other titles counts too. No flag to maintain, and
in sync as the alignment grows.
no list to keep in sync as the alignments grow.


The count is of QUOTATIONS, not segments. One quotation is often split over
The count is of QUOTATIONS, not segments. One quotation is often split over
several consecutive segments — the Pitāputrasamāgamanasūtra has 62 quote
several consecutive segments — the Pitāputrasamāgamanasūtra has 62 quote
segments but is quoted 14 times, and one of its runs is 36 segments long.
segments in the Śikṣāsamuccaya but is quoted 14 times, and one of its runs is
See the module for how the runs are collapsed.
36 segments long. See the module for how the runs are collapsed.


Collapsed by default: the list is a click away, and nobody pays for it
Every aligned translation is searched, not just the Śikṣāsamuccaya: sixteen
while browsing.
carry quote data, and 53 texts are cited by more than one — the
-->{{#if: {{#invoke:SscCitations|count}}
Laṅkāvatārasūtra by six. The panel groups by citing work, root texts first.
|<div class="ssc-citations-block mw-collapsible mw-collapsed" data-expandtext="Show the passages" data-collapsetext="Hide the passages">
 
<div class="ssc-citations-heading"><i class="fa-sharp-duotone fa-solid fa-quote-left fa-sm mr-2"></i>Cited {{#invoke:SscCitations|count}}&nbsp;times in the ''Śikṣāsamuccaya''</div>
Collapsed by default, and the panel itself is @deferred so the module runs
<div class="mw-collapsible-content">{{#invoke:SscCitations|list}}</div>
after the page paints. See Template:SscCitationsDeferred.
 
This gate used to test DrlPageName for an "RKTS" catalogue prefix, a proxy for
"canonical text" from before QuoteSource was a Page. It hid every cited text
without a catalogue number (16 in Oct 2026, e.g. Tathāgatakośasūtra). The
module still checks Classification, so a non-text page that is named as a
source renders no passages, and tws.js removes the empty panel.
 
Keep the pipe on the same line as the expression: #ifexpr fails on a trailing
newline.
-->{{#ifexpr: {{#ask:[[QuoteSource::{{FULLPAGENAME}}]]|format=count}} > 0|
<div class="ssc-citations-block mw-collapsible mw-collapsed" data-expandtext="Show the passages" data-collapsetext="Hide the passages">
<div class="ssc-citations-heading"><i class="fa-sharp-duotone fa-solid fa-quote-left fa-sm mr-2"></i>Quoted in the aligned translations</div>
<div class="mw-collapsible-content">{{#ask:[[{{FULLPAGENAME}}]]
|?DrlPageName
|format=template
|template=SscCitationsDeferred
|named args=yes
|link=none
|limit=1
|searchlabel=
|default=
|@deferred
}}</div>
</div>
</div>
|
|
Line 536: Line 559:
|
|
}};{{{ ExtraCats | }}}
}};{{{ ExtraCats | }}}
}}<!--  
}}<!--
 
Facet categories for the site search: one per topic and one per decade.
Hidden from the footer in CSS. See Module:FacetCategories.
-->{{#invoke:FacetCategories|main|topics={{{ TermTopics | }}}|date={{GetItemData|prop=Pubdate}}}}<!--  


Silently set SMW properties via lua (for fetched values that are straightforward):
Silently set SMW properties via lua (for fetched values that are straightforward):

Latest revision as of 17:38, 8 October 2026