Template:Subject page/doc

Usage
This template is used on subject pages to list books within that subject's respective category. Used on a subject page, it also handles queries to the subject page from other pages. For top-level subjects, use root subject instead.

Parameters

 * : specifies a parent subject, of which this subject is a member
 * : optional, specifies a second parent subject for the subject page
 * : specifies the description of the subject area the page will cover
 * : optional, specifies which namespace should be searched through for books; defaults to the main namespace
 * : optional, specifies whether to list books at each completion level that are in descendant subjects as well as those in this subject; specifying  lists only those in this subject; specifying   lists first books in this subject, then books in descendants; any other non-blank value lists books in this subject and descendants as a single undifferentiated list; default is
 * : optional, specifies whether to list featured books in descendant subjects as well as in this subject; specifying  lists only those in this subject; specifying   lists first books in this subject, then books in descendants; any other non-blank value lists books in this subject and descendants as a single undifferentiated list; default is
 * : optional, specifies a requested maximum length of the book lists; default is the maximum supported directly by the extension (as of this writing, 200); request a larger number if it may be required for this subject; see DPL.
 * : optional, specifies the Robox theme for the description box; defaults to 15
 * : optional, specifies the Robox theme for the book box; defaults to 3
 * : optional, specifies the logo displayed in the description box without the  included; defaults to the Wikibooks logo
 * : optional, specifies the width of the logo displayed in the description box with  included; defaults to 45px
 * : needs to be passed through from the calling subject page to this template, otherwise the subject category can't extract a subject description or full header
 * : optional, specifies how much information is allowed to be provided to the subject category; possible values are blank (no description or header),  (only provide a description) or   (provide a full header); note however that   does the same thing as omitting parameter , while blank does the same thing as omitting parameter

Internals
This template itself only determines which sort of information request is being made, and either provides the information (if it isn't asking for a full subject display); or delegates the request to subject page/core, which is responsible for generating a full display. Delegation is done using Module:TScope, so that the subtemplate can tell which parameters were not provided, in order to supply default values for them.

When the transcluding page is in  or   space, this template always delegates to produce a full display. In all other namespaces, ordinarily the template returns a string of the form /parent/parent2, where parent and parent2 are the parameter values specified to this template. This parentage information, easily parsed using magic word, allows other pages to navigate upward in the subject hierarchy. Before attempting to extract the parents this way, the caller verifies correct format of the result by passing it to template parsable &mdash; and if the format doesn't verify, the caller reports the problem to Category:Attention needed (allbooks).

Parameter  is used by the corresponding subject category to extract additional information for use in the category header. Value  requests a verbal description of the subject, in which case this template returns the value of its parameter. Value  requests the full subject display, in which case this template delegates the task to subject page/core. Value  asks which such information is recommended; the result returned is either   or , indicating the named information is recommended, or blank indicating no such information is recommended (as would be the case if for some reason the information were not available). By default, this template returns mode ; but parameter   if provided overrides this default, allowing the subject to specify how much information the subject category should show.