Template:BOOKPAGENAME/category
This template is used on 4,000+ pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This subtemplate of {{BOOKPAGENAME}} handles for {{BOOKPAGENAME/core}} the case of category namespace.
Usage
The two parameters expected are namespace
and pagename
.
Internals
At this writing, the associated book name for a category is derived from the pagename
by stripping an optional Book:
prefix and treating the result as the full name (with namespace) of an in-book page, delegating through {{BOOKPAGENAME/refactor}} to {{BOOKPAGENAME/inbook}}.
If the Book:
prefix becomes mandatory in the future, the optional-prefix-stripping could be modified to simply always strip off the first five characters, but it's not clear that making the code less able to handle contingencies is a fair exchange for vanishingly small cost savings, even if the contingencies aren't expected to happen anymore.