Template:SHELFNAME/doc

This template generates the name of the shelf page intrinsically 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 intrinsically associated with a shelf; 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 shelf-category name is then delegated to SHELFNAME/core.