Template:LibraryItem: Difference between revisions

From Bodhicitta
(VSCode edit)
(Defer the citations panel so it does not slow the page parse)
Line 302: Line 302:


The gate is now DrlPageName rather than a count, because asking for a count
The gate is now DrlPageName rather than a count, because asking for a count
would run the module during the parse and undo the deferral. Any canonical
would run the module during the parse and undo the deferral. Read with #show,
text carries that property, so a few pages will open the panel to nothing —
not GetItemData — that helper does not carry this property.
acceptable next to adding seconds to every one of them.
 
-->{{#if: {{GetItemData|prop=DrlPageName}}
Any canonical text has the property, so the panel renders on 256 pages while
only 112 are cited. tws.js removes it once the deferred block lands empty.
-->{{#if: {{#show:{{FULLPAGENAME}}|?DrlPageName}}
|<div class="ssc-citations-block mw-collapsible mw-collapsed" data-expandtext="Show the passages" data-collapsetext="Hide the passages">
|<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="ssc-citations-heading"><i class="fa-sharp-duotone fa-solid fa-quote-left fa-sm mr-2"></i>Quoted in the aligned translations</div>

Revision as of 14:45, 28 August 2026