Template:UI/publications library
Curated Publications library page. Drop
into a content page (e.g.
the wiki's Publications page) to render a searchable,
filterable view of every page in Category:Publication.
Renders, top to bottom:
- Header — h1 title + lead paragraph + a stat strip showing
total publication count, distinct journal count, and year span.
- Full-text search box — a link to MediaWiki's built-in
Special:Search scoped to Category:Publication. Kept
as a sibling of the filtered list because Semantic Result Formats'
filter UI handles property faceting but doesn't grep titles or
abstracts; full-text search is the complementary affordance.
- Filtered publications list — an SRF
format=filtered
ask that pairs the Template:UI/publications_library/entry row partial with client-side filter controls for Publication type, Paper type, and Publication year. The filter sidebar renders next to the list and updates the visible rows live (no page reload, no Special:SearchByProperty round-trip).
Why format=filtered instead of chips + Special:SearchByProperty
The earlier cut of this template surfaced facets as a chip strip
linking to Special:SearchByProperty — a deliberately
no-JavaScript choice that kept it working when SRF wasn't installed,
at the cost of bouncing the user off the page on every filter click.
With SRF available on the deployment we now target, the filtered list
gives a single-page faceted browse without that round-trip, so the
chip strip was removed to avoid duplicating the same affordance in
two UIs.
If a future deployment ships without SRF (or wants explicit no-JS
fallback), re-add the chip strip by composing
format=list + Special:SearchByProperty as
the previous version did — the
Template:UI/publications_library/facet_chip partial used by that
version stays in the repo for that reuse.
Why the Earliest-year KPI carries #-= and searchlabel=
SMW's format=list with a single projected printout
renders as "PropertyLabel: value" plus a "... further
results" link when the result set is larger than limit=.
Three knobs together strip it down to a bare value:
?Has publication year#-=— empty alias drops the
property-label prefix; the #- modifier drops locale
number formatting (otherwise SMW renders 2023 as "2,023").
searchlabel=(empty) — suppresses the "... further
results" link from limit=1.
mainlabel=-— already there; suppresses the page name.
Why the filtered-list entry partial takes positional args
SRF's filtered-list view, when list view named args=yes
is set, prefixes every param name with a literal ? (see
'?' . $printrequest->getLabel() in SRF's
ListView.php). A template trying to read
sees nothing, because the param is actually
called ?title. Two ways out: use the awkward
syntax in the row template, or drop
list view named args=yes and use positional
{{{1}}}..{{{N}}}. We do the latter — SRF guarantees the
positional order matches the declared printout order (no shuffling
of filtered columns to the front), so positional is robust here.
The printout aliases (=Year, =Type,
=Paper type) are still set because SRF uses them as the
filter sidebar labels. Pretty labels for filters; positional args for
rendering.
Parameters (all optional)
heading— page heading (default: "Publications").
Empty string suppresses the <h1>.
lead— short intro paragraph below the heading
(default: "Peer-reviewed articles, preprints, and other scholarly works from the community.").
limit— how many publications to load into the
filtered list (default: 200). Set higher than the earlier format=template list because filtering happens client-side over the loaded result set: too low a limit hides matching publications from the filter UI. Set lower on very large libraries where the payload size of one page is the binding constraint.
search_url— destination for the "Search publications"
link (default: built from Special:Search scoped to
Category:Publication). Override to point at Special:Drilldown,
Special:Ask, or a custom search portal.
Cross-template dependencies
- Template:UI/publications_library/entry — row partial for the
filtered list.
- Template:Category/Publication/byline — used by the row
partial to render the author byline.
- Template:UI/kpi_card — used for the stat strip.
- Template:UI/icon — search-button icon.
- Semantic Result Formats with the filtered format enabled
($srfgFormatsincludesfiltered). The filtered-format JS/CSS resources must be loaded; without them the list will render but the filter sidebar will be inert.