Template:Subject category/core2/doc

From Wikibooks, open books for an open world
Jump to navigation Jump to search

This template implements the final phase of internal processing for template {{Subject category}}. On entry here, we already know the subject page exists and is correctly formatted for extraction of its parents, and we have already extracted its parents.

Usage[edit source]

There are three parameters, assumed to be specified (even if blank).

  • parent — the name of a parent subject, or blank.
  • parent2 — the name of a parent subject, or blank.
  • subject — the name of the subject associated with this category.

This template generates the category header for this category, and adds this category to its parent category(-ies). The form of the category header depends on what additional information, if any, is provided by the subject page.

Internals[edit source]

Availability of additional information from the subject page is determined by transcluding the subject page with template parameter 1=mode. If the subject page responds with header, the full content for the category header is expected to be available by transcluding the subject page with template parameter 1=header, and this is done. If the subject page responds with description, a description of the category is expected to be available by transcluding the subject page with template parameter 1=description, and this is done and the result is appended to the default category header. Otherwise the default category header is used.

See also[edit source]