Template:PersonWorksSection

From Bodhicitta
Revision as of 15:43, 13 August 2026 by Jeremi (talk | contribs) (VSCode edit)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Purpose

Renders one relationship-scoped block of works on a person page: a header with a live count, an optional filter box (shown once the block exceeds 7 items), and the tile grid itself.

The whole block renders nothing at all when the query returns no results, which is what makes the hybrid layout on Template:PersonCall work — a person with only authored works gets exactly one section, while someone who both wrote and narrated gets a labelled section for each.

Parameters

Parameter Description
query SMW query for this section. Required.
heading Section header text. Defaults to "Works".
blurb Optional italic line under the header, to explain the relationship.
noun Plural noun used in the filter placeholder, e.g. "recordings".
limit Max tiles. Defaults to 108.
sort / order Passed through to Template:TileQuery.

Note on counts

The count query runs more than once inside this template (header, filter threshold, filter placeholder). SMW caches identical queries within a single parse, so this costs one lookup rather than three. It is written out longhand because the Variables extension is deliberately not installed on this wiki.