Template:Documentation subpage/doc

From Chalo Chatu, Zambia online encyclopedia
Revision as of 14:24, 10 September 2025 by Chalochatu (talk | contribs) (Created page with "{{Documentation subpage}} This template standardizes the header and categorization for documentation subpages (usually “/doc”) on {{SITENAME}}. It: * Shows a documentation notice with a link to the parent page. * Adds a DEFAULTSORT key. * Categorizes the doc subpage (or flags it if the parent page does not exist). * Hides itself when not on the expected subpage (e.g., if transcluded on the main template page by mistake). It uses {{tl|Mbox}} for the notice if availa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
This is a documentation subpage for Template:Documentation subpage.
It contains usage information, categories and other content that is not part of the original template page.

This template standardizes the header and categorization for documentation subpages (usually “/doc”) on Chalo Chatu, Zambia online encyclopedia. It:

  • Shows a documentation notice with a link to the parent page.
  • Adds a DEFAULTSORT key.
  • Categorizes the doc subpage (or flags it if the parent page does not exist).
  • Hides itself when not on the expected subpage (e.g., if transcluded on the main template page by mistake).

It uses {{Mbox}} for the notice if available; otherwise it falls back to a plain styled box.

Usage

Place at the very top of a documentation subpage:

{{Documentation subpage}}

If the parent is non-standard or you want to override the link text:

{{Documentation subpage|1=[[:Template:Example]]}}

If your docs live on a different subpage name (e.g., “/guide”), set override:

{{Documentation subpage|override=guide}}

Parameters

1
Optional. Link to the parent page shown in the notice. Defaults to Template:Documentation subpage.
override
Optional. Subpage name that should be considered “the documentation page”. Defaults to doc. Example: override=sandbox.
doc-notice
Optional. Set to show (default) to display the notice; any other value hides it.
text1, text2
Optional. Custom trailing text in the notice. If text2 is set it takes precedence; otherwise text1. If neither is set, the template auto-describes the parent as a user/template/article page.
defaultsort
Optional. Value for Warning: Default sort key "…" overrides earlier default sort key "Documentation subpage/doc".. Defaults to Documentation subpage/doc.
inhibit
Optional. Any non-empty value suppresses categorization (useful for test or draft docs).

Behavior

  • Only outputs the notice and categories when transcluded on /doc.
  • When doc-notice=show and {{Mbox}} exists, a standard message box is shown; if {{Mbox}} is absent, a plain fallback box is rendered.
  • Categorizes into a project-appropriate “documentation pages” category if the parent exists; otherwise into a tracking category for docs without a corresponding parent.

Examples

Basic:

<!-- Template:Example/doc -->
{{Documentation subpage}}

== Purpose ==
Explain the template here…

Custom parent link:

{{Documentation subpage|1=[[:Template:Infobox person]]}}

Custom subpage name:

{{Documentation subpage|override=guide}}

Suppress categories (e.g., in a user sandbox):

{{Documentation subpage|inhibit=1}}

See also

  • {{Documentation}} – a wrapper often placed on the main template page to transclude this “/doc” subpage.
  • {{Mbox}} – optional, enhances the notice styling if installed.

TemplateData

Adds a standardized notice, defaultsort, and categories for documentation subpages (typically “/doc”). Hides itself when not on the expected subpage. Uses Mbox if available; otherwise falls back to plain styling.

Template parameters

ParameterDescriptionTypeStatus
Parent link1

Custom link to the parent page shown in the notice. Defaults to [[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]].

Stringoptional
Override subpage nameoverride

Treat a different subpage name as the documentation page instead of 'doc' (e.g., 'guide', 'manual').

Stringoptional
Show noticedoc-notice

Set to 'show' (default) to display the documentation notice; any other value hides it.

Default
show
Stringoptional
Custom trailing texttext1

Custom trailing text in the notice (used if text2 is not provided).

Stringoptional
Custom trailing text (priority)text2

Custom trailing text in the notice; takes precedence over text1 when provided.

Stringoptional
Default sort keydefaultsort

Value for DEFAULTSORT; defaults to the page name.

Stringoptional
Suppress categoriesinhibit

Set to any non-empty value to prevent this doc page from being categorized.

Stringoptional