Template:TopicBiblioRow: Difference between revisions

From Bodhicitta
(VSCode edit)
(Optional SchoolTib in the meta line (only CommentaryRow passes it))
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="topic-biblio-row filterable" data-class="{{{ Class | }}}"><!--
<includeonly><div class="topic-biblio-row filterable{{#ifeq:{{{#userparam|}}}|title|&#32;topic-biblio-row--titled|}}" data-class="{{{ Class | }}}"><!--
One bibliographic entry on a topic page.
One bibliographic entry on a topic page.


Line 35: Line 35:
beside it already links to the item, so no navigation is lost.
beside it already links to the item, so no navigation is lost.
-->{{#if: {{{ FrontCoverImg | }}}
-->{{#if: {{{ FrontCoverImg | }}}
|<div class="topic-biblio-thumb">[[File:{{PAGENAME:{{{ FrontCoverImg | }}}}}|200px|class=object-fit-cover w-100 h-100]]</div>
|<div class="topic-biblio-thumb tws-lightbox">[[File:{{PAGENAME:{{{ FrontCoverImg | }}}}}|200px|class=object-fit-cover w-100 h-100]]</div>
|<div class="topic-biblio-thumb topic-biblio-thumb-empty"></div>
|<div class="topic-biblio-thumb topic-biblio-thumb-empty"></div>
}}
}}
<div class="topic-biblio-body">
<div class="topic-biblio-body"><!--
<div class="topic-biblio-citation">[[{{{ 1 | }}}|{{#if: {{{ Citation | }}}
TITLE LINE (library hub pages only)
|{{{ Citation | }}}
 
|{{#if: {{{ Title | }}}|{{{ Title | }}}|{{SUBPAGENAME:{{{ 1 | }}}}}}}
Module:LibraryRows passes userparam=title, so its rows lead with the work's
}}]]</div><!--
title, larger, above the citation: a list sorted by citation reads author
first, and the title line keeps it scannable by work. Topic pages and the
Bibliography pass nothing and are unchanged. The userparam arrives as a
parameter named #userparam, with the hash.
-->{{#ifeq:{{{#userparam|}}}|title
|<div class="topic-biblio-title">[[{{{ 1 | }}}|{{#if: {{{ FullTitleTib | }}}
|{{I18n|en={{#if: {{{ Title | }}}|{{{ Title | }}}|{{SUBPAGENAME:{{{ 1 | }}}}}}}|bo={{{ FullTitleTib | }}}}}
|{{#if: {{{ Title | }}}|{{{ Title | }}}|{{SUBPAGENAME:{{{ 1 | }}}}}}}
}}]]</div>
|
}}
<div class="topic-biblio-citation">[[{{{ 1 | }}}|{{#if: {{{ FullTitleTib | }}}
|{{#ifeq:{{{#userparam|}}}|title
|{{#if: {{{ Citation | }}}|{{{ Citation | }}}|{{#if: {{{ Title | }}}|{{{ Title | }}}|{{SUBPAGENAME:{{{ 1 | }}}}}}}}}
|{{I18n|en={{#if: {{{ Citation | }}}|{{{ Citation | }}}|{{#if: {{{ Title | }}}|{{{ Title | }}}|{{SUBPAGENAME:{{{ 1 | }}}}}}}}}|bo={{{ FullTitleTib | }}}}}
}}
|{{#if: {{{ Citation | }}}|{{{ Citation | }}}|{{#if: {{{ Title | }}}|{{{ Title | }}}|{{SUBPAGENAME:{{{ 1 | }}}}}}}}}
}}]]<!--
TIBETAN (the language toggle)
 
FullTitleTib and DescriptionTib, where the item has them, are carried as the
Tibetan side of {{I18n}}, so switching the toggle to Tibetan shows them and an
item without them stays in English. On a titled row the Tibetan title goes on
the title line and the citation stays as it is, so the title is not shown twice.
--><!--
AUTHOR BYLINE
AUTHOR BYLINE


Only when there is no Citation. A citation already opens with the author, so
Inline, straight after the title, so the line reads the way a citation does
printing it again would just repeat the line above; but our own editorial
— work then author — rather than stacking a second line under it.
writing carries no citation at all, which left those rows with no byline.
 
Only when there is no Citation: a citation already opens with the author, so
printing it again would just repeat the line above. Our own editorial writing
carries no citation at all, which is what left those rows with no attribution.
 
BcaAuthor arrives as a raw page title ("People/Houlton, S."), because the
query runs with link=none and would otherwise flatten it to plain text. The
link is built here instead, and MediaWiki applies the person's display title,
so it reads "Simon Houlton".


BcaAuthor is a page-type property holding People/ pages, so the link text is
Deliberately NOT split with #arraymap: these page names contain commas, so
trimmed to the readable name. Present on about a quarter of Editorial pages,
splitting on comma turns one author into two red links.
so the row still has to read correctly without it.
 
Present on about a quarter of Editorial pages, so the row still has to read
correctly without it. No leading space before the span: it is supplied in CSS
so the separator moves with the styling.
-->{{#if: {{{ Citation | }}}
-->{{#if: {{{ Citation | }}}
|
|{{#if: {{{ BcaAuthor | }}}
|<div class="topic-biblio-byline">{{#arraymap:{{{ BcaAuthor | }}}
|,
|@@@
|[[@@@|{{SUBPAGENAME:@@@}}]]
|,&nbsp;
}}</div>
|
|
}}
|{{#if: {{{ BcaAuthor | }}}
}}
|<span class="topic-biblio-byline">[[{{{ BcaAuthor | }}}]]</span>
|
}}
}}</div>
<div class="topic-biblio-meta">{{#if: {{{ Class | }}}
<div class="topic-biblio-meta">{{#if: {{{ Class | }}}
|<span class="topic-biblio-class">{{{ Class | }}}</span>
|<span class="topic-biblio-class">{{{ Class | }}}</span>
|
}}{{#if: {{{ SchoolTib | }}}
|<span class="topic-biblio-school" lang="bo">{{#arraymap:{{{ SchoolTib | }}}|;|@@@|@@@|&nbsp;·&nbsp;}}</span>
|
|
}}{{#if: {{{ Pubdate | }}}
}}{{#if: {{{ Pubdate | }}}
|<span class="topic-biblio-date">{{{ Pubdate | }}}</span>
|<span class="topic-biblio-date">{{{ Pubdate | }}}</span>
|
|
}}{{#if: {{{ TileDescription | }}}{{{ Description | }}}
}}{{#if: {{{ TileDescription | }}}{{{ Description | }}}{{{ DescriptionTib | }}}
|<span class="topic-biblio-more" role="button" tabindex="0" aria-expanded="false">About this item</span>
|<span class="topic-biblio-more" role="button" tabindex="0" aria-expanded="false">About this item</span>
|
|
}}
}}
</div>{{#if: {{{ TileDescription | }}}{{{ Description | }}}
</div>{{#if: {{{ TileDescription | }}}{{{ Description | }}}{{{ DescriptionTib | }}}
|<div class="topic-biblio-desc" hidden>{{#if: {{{ TileDescription | }}}
|<div class="topic-biblio-desc" hidden>{{#if: {{{ DescriptionTib | }}}
|{{{ TileDescription | }}}
|{{I18n|en={{#if: {{{ TileDescription | }}}|{{{ TileDescription | }}}|{{#if: {{{ Description | }}}|{{{ Description | }}}|{{{ DescriptionTib | }}}}}}}|bo={{{ DescriptionTib | }}}}}
|{{{ Description | }}}
|{{#if: {{{ TileDescription | }}}|{{{ TileDescription | }}}|{{{ Description | }}}}}
}}</div>
}}</div>
|}}
|}}

Latest revision as of 12:20, 5 October 2026


Renders one row of the bibliographic list on a topic page.

Called by Template:TopicBiblioSection with named args=yes, so the printout names in that query must match the parameter names used here.