Template:Category/Guide

From Miniscope
Jump to: navigation, search

Render template for Category:Guide pages.

Called by the SemanticSchemas dispatcher when a page belongs to Category:Guide. Overrides the inherited Template:Category/Document dispatch (Guide is a subcategory of Document — see schema/categories/Guide.wikitext) by delegating the masthead to Template:Tl, then adding guide-specific sections below:

  • Parent breadcrumb — when Has parent guide is set,
 a one-line "Part of Parent" cue links upward.
  • Guide facets — Topic, Format, Audience level. Each only renders
 when its source property is set so an unannotated guide doesn't show
 blank labels.
  • Workflow section (conditional) — when this guide participates
 in a workflow graph, embed the mermaid graph plus, for workflow
 nodes, an accessible text-nav fallback.

Workflow detection

The detection logic answers two yes/no questions in order:

  1. Am I a workflow container? — counted as a container when at
 least one of my direct child guides (a guide where
 Has parent guide points back to me) declares any
 Has prerequisite guide value. The container itself
 needs no workflow property set. → Render the full graph.
  1. Am I a workflow node? — counted as a node when my
 Has parent guide points to a guide that qualifies as
 a container by the rule above. → Render the "you-are-here" graph
 in a right-floating sidebox, plus the text-nav fallback.

A guide matching neither role renders no workflow section at all.

Implications worth knowing as an author:

  • Workflow scope is bounded by the parent. Every node in a
 workflow is a direct child of the same container guide.
  • To add a step to a workflow: set its Has parent guide
 to the container, and set Has prerequisite guide to any
 sibling guides that must come first.
  • Starting nodes need no prereqs — they enter the graph when a
 downstream sibling names them as a prerequisite.
  • Workflow members with no edges in or out are invisible. If a
 guide is parented to the container but neither has nor is a prereq,
 it won't appear in the diagram.

Properties read:

 Has date, Has author,
 Has version, Has description,
 Has DOI.
  • Guide facets: Has guide topic,
 Has guide format, Has audience level,
 Has parent guide.
  • Workflow detection + rendering:
 Has parent guide, Has prerequisite guide
 (plus the inverse ... for
 the "next steps" view in the nav block).

Parameters:

  • category — "Guide" (informational)
  • page — the page being rendered. Falls back to Template:Category/Guide.

Visual treatment lives in Template:Category/Guide/styles.css — override the underlying --labki-* tokens in a wiki's MediaWiki:Common.css to retheme just one wiki. Sub-templates: