Template:Department:Page/doc

Usage
Use this template on a department page in the ; everything on the department page other than the template call should be wrapped in .

The template primarily provides a detailed display of information about the department, including its description, its children (immediate sub-shelves), and featured books on any of its shelves. It only performs that primary function if called from a  with the prefix and not overridden by unnamed parameter.

The corresponding template for shelves is.

Blank invocation
These are provided as a convenient source from which to copy and paste for use on a new page.

Internals
This template itself determines which sort of information request is being made, and either provides information directly, or delegates the display function to. 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 mainspace, has  prefix , and is not overridden by a non-blank first unnamed parameter, this template delegates to produce a full display. If the unnamed parameter has value, this template returns the value of its parameter. Otherwise, this template returns its own name,.