Template:Category scope/doc

From blackwiki
Jump to navigation Jump to search

This is a meta-template that provides a hatnote at the top of a category, explaining the extent of its scope, e.g. the countries and territories that qualify for inclusion in a continental category. Technically, it can be used directly as a template, but there is no benefit to doing this over simply adding a plain wikitext note at the top of the category as usual. This template is for repeating detailed scope information across an entire category branch.


Usage

See, e.g., Template:Category scope South America for an example of how to deploy this meta-template. It must be supplied with at least one parameter; the others are optional (see below).

Parameters

  • |scope=Required the scope of the category, an inline list of what is in-scope, and (if pertinent) a note about exclusions that might not be obvious to all editors or readers. This value is hard-coded into each template derived from this meta-template, so that it is presented consistently across an entire branch of categories.
  • |topic= – Wording about the topical nature of the material; this wording follows "This category covers" and precedes the value of |scope=. Example value: |topic=species found in. This value is usually provided on a category-by-category basis (or consistently for a set of related categories, e.g. on regional flora and fauna), when used at all, through the |topic= parameter of a template derived from this meta-template.

Documentation of derived templates[edit]

Documentation of templates derived from this meta-template can be done in-situ the usual way, or with a {{Documentation|content={{Category scope/doc|parameters}}}} transclusion after the template code. The latter option customizes the documentation based on the following parameters (the first mandatory):

  • |version=Required: the name of the category topic (and usually the main article on the subject, e.g.: |version=South America. Presence of this parameter suppresses documentation relating the meta-template itself (e.g. the entire section you are reading now), and customizes the output to match the specific template in question.
  • |namely= – Wording about the categorical nature of the scope, a concise descriptor of the inline list provided in |scope= of the template itself. This will cause the documentation to display "...explaining the extent of its scope, namely" then the value of |namely= and a period/stop (instead of just "...explaining the extent of its scope."). See Template:Category scope South America for an example.
  • |note= – A sentence (or more) with any template-specific notes, e.g. about the intent of the default scope provided by the template. The output is formatted as a <div>...</div> (thus, can contain multiple paragraphs) after the first sentence of the documentation, before the "Usage" secton. See Template:Category scope South America for an example.
  • |custom-parameters= – Any custom parameters supported by the specific template may be passed into the above main template documentation with this parameter of the doc transclusion, and will appear below the template parameter documentation for |topic=, above. Each parameter line-item must begin on a newline and start with the * character, so that it is formatted as part of the above template parameter documentation list. See Template:Category scope South America for an example.

See also