Template:Source/pub/doc
This is a documentation subpage for Template:Source/pub (see that page for the template itself). It contains usage information, categories and other content that is not part of the original template page. |
This template is used on over 21,000 pages. Changes to this template may cause some server load, and mistakes will be visible on many pages. Please carefully test any edits before making them, and avoid making unnecessary edits. |
This template handles the publisher field for {{source}}. Though this is called for every citation, the logic in handling this field is somewhat nontrivial, so factoring out the formatting to here leaves the parent template more purely concerned with sorting out the template fields.
Usage
editThree parameters are supported:
pub
— required — name of the publisher.target
— required — target for the link; always provided by the parent template (which is responsible for sorting out the template interface).target=no
requests the publisher be left unlinked (see {{source/pub/no}}).nocat
— optional — if non-blank, suppresses categorization.
Internals
editDon't be tripped up by the parameter names here. They do not correspond, quite, to the names of parameters passed to the parent template, {{source}}. Parameter pub
is often, but not always, the same as the same-named parameter to the parent template. Parameter target
is sometimes the same as parent parameter pubtarget
, but that parent parameter is optional and (as of this writing) usually omitted, whereas the target
parameter here is required.