Template:SUBJECTNAME/doc

This template generates the name of the subject page associated with the current page. Compare BOOKNAME.

Usage
Simply place  on a page to get the output.

Optionally specify a page as a parameter to see the output for a different page than the current one.

Deduction assumes the page is associated with a subject; this maximizes convenience of valid use, while disregarding behavior on invalid use.

Internals
This template itself only contains the logic to sort out the namespace and base-name; deducing from those data the associated subject-category name is then delegated to SUBJECTNAME/core.