Template:Category/Dashboard/sub dashboard card
Row renderer for the sub-dashboard KPI grid in the Category:Dashboard display template (Template:Category/Dashboard).
Invoked via SMW's format=template with named args=yes
and link=none (so positional arg {{{1}}} is the
bare page name, not a wikilink).
Emits a single clickable KPI card per child dashboard. The markup is inlined
here (rather than calling Template:UI/kpi_card) because some SMW
configurations don't transclude nested templates reliably from inside a
format=template row template.
Card structure mirrors Template:UI/kpi_card's linked variant:
<div class="wiki-kpi-card wiki-kpi-card-link">…</div>.
- Value — count of entries in the child's
Has focus category,
if set. Otherwise an em-dash.
- Label — the leaf segment of the dashboard's page name (so
Dashboard/Knowledge overviewrenders asKnowledge overview).
- Link — the dashboard page itself; the whole card is clickable.
Named args:
— the dashboard page (named arg, from SMW'smainlabel=Page; bare name when called withlink=none). Falls back to positionalfor direct template invocations like{{Category/Dashboard/sub_dashboard_card|1=Dashboard/Foo|Focus=Category:Foo}}.Focus— value of?Has focus category=Focus. Withlink=noneon the parent query, this comes through as the canonical full title including the namespace prefix (e.g.Category:Submission). Used directly in the count query as[[{{{Focus}}}]]— do not prepend anotherCategory:.Description— value of?Has description=Description(currently unused; kept for future tooltip use)
Why the named-arg detour: with format=template + named args=yes + link=none, SMW silently fails to populate {{{1}}} with the subject — it expects the subject to be reached by its mainlabel. Setting mainlabel=Page on the parent #ask exposes the page under {{{Page}}}.