Template:Department:Page
This template uses Lua: |
This template is used on 7,700+ 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. |
Usage
Use this template on a department page in the Wikibooks Stacks; everything on the department page other than the template call should be wrapped in <noinclude>...</noinclude>
.
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 PAGENAME
with the prefix and not overridden by unnamed parameter.
The corresponding template for shelves is {{Shelf:Page}}.
Parameters
Name | Function |
---|---|
|description=
|
Specifies the description of the subject matter the department covers. |
|namespace=
|
Specifies which namespace should be searched through for books; defaults to the main namespace. (optional) |
|reserved=
|
Specifies the description of a reserved shelf for the department, or blank to indicate there should be an inclusive shelf for the department instead of a reserved shelf; default is general references . (optional)
|
|1=
|
Needs to be passed through from the department page to this template, otherwise it would not be possible for a transcluding page to override the display function. |
— Cosmetic parameters, less often used — | |
|theme=
|
Specifies the {{Robox}} theme for the description box; defaults to 15. (optional) |
|theme2=
|
Specifies the {{Robox}} theme for the books box; defaults to 3. (optional) |
|icon=
|
Specifies the logo displayed in the description box without the File: included; defaults to the Wikibooks logo. (optional)
|
|iconwidth=
|
Specifies the width of the logo displayed in the description box with px included; defaults to 45px. (optional)
|
Blank invocation
These are provided as a convenient source from which to copy and paste for use on a new page.
Commonly-used | Full |
---|---|
{{Department:Page | description = | 1 = {{{1|}}} }} |
{{Department:Page | description = | namespace = | reserved = | 1 = {{{1|}}} | theme = | theme2 = | icon = | iconwidth = }} |
Internals
This template itself determines which sort of information request is being made, and either provides information directly, or delegates the display function to {{Department:Page/display}}. Delegation is done using Module:TScope#override, 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 PAGENAME
prefix Department:
, 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 reserved
, this template returns the value of its parameter reserved
. Otherwise, this template returns its own name, Department:Page
.