Template:Category/Maintenance record

From Miniscope
Jump to: navigation, search

Render template for Category:Maintenance record subobjects.

Called by the SemanticSchemas dispatcher when a category's Maintenance record field declaration designates this template as its renderer (via has_subobject_display_template=Category/Maintenance record on Category:Maintenance record).

Gated on Has maintenance interval being set on the host page. If the page has no interval, this template renders nothing — the equipment isn't enrolled in maintenance tracking, so we don't show a status sidebox or emit derived annotations even if Maintenance record subobjects happen to exist.

When the interval IS set, delegates to Template:Category/Maintenance record/State which both emits the page-level annotations (Has last maintained, Has next maintenance date) and renders the maintenance status sidebox.

The import-annotation=true parameter on the inner #ask is essential — without it the inner #set calls in the State subtemplate don't attach to the host page.

See Template:Category/Review record for the equivalent review-cadence template — this one mirrors its architecture closely.

Parameters:

  • category — "Maintenance record" (informational)
  • page — the parent page. Falls back to
 Template:Category/Maintenance record if the dispatcher doesn't pass it.