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, | ||
not GetItemData — that helper does not carry this property. | |||
-->{{#if: {{ | 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> | ||