Nonkiki:Templates

From Nonkiki Wiki
Jump to navigation Jump to search

Templates are a way to include content from one page, in another page. This can be used to:

  • reduce duplication
  • standardize presentation
  • leverage other peoples work

Using templates

Invoking a simple template

Templates are called by name, using double braces. For example, to call the template "Choose", do:

{{Choose}}

Invoking a template with arguments

Some templates take arguments, either by position, eg:

{{Choose|100}}

... or by name, eg:

{{NNTP|id=5mdpdv$t7b$1@goanna.cs.rmit.edu.au}}

For details on how to use a specific template, including its arguments, see its individual documentation. Template documentation is normally displayed when you visit the template page; or it can be viewed directly by visiting the templates /doc subpage.

Editing templates

Because templates are reused in so many places, incompetence and malice during editing can be significantly more devastating than with ordinary pages. It is strongly recommended that you (a) thoroughly test (on your user subpages), and (b) seek consensus before creating or modifying any templates.

In particular be very careful - especially when using <includeonly> and <noinclude> - to avoid generating spurious whitespace - especially newlines - as these can cause problems when transcluded into wikimarkup that does not like newlines, eg bold text.

Template documentation

All templates should include documentation. At the very least, this should describe the templates intended use, and any arguments it takes.

Most templates are relatively simple, and the documentation is kept with the template using <noinclude>.

Some more complex templates require a separate documentation page. For Template:Foo, the documentation would conventionally reside at Template:Foo/doc (though there are a very few exceptions where a set of related templates share a documentation page).

For the convenience of all, the documentation is automagically transcluded onto the Template page when the template page is visited directly. An InfoBox explains this on affected pages; see Template:Doc for more details.

List of template categories

Templates are tagged with categories according to function. Any given templates may reside in more than one category (and all should reside in at least one category). In approximately decreasing order of the likelihood that you would actually need to use them, they are:

Use on any page

  • Presentation templates are used to present simple values or complex data structures (such as colours and dates) in standard ways; any of these could be used directly by a content page
  • Date templates are used to perform calculations upon dates, or to present dates or differences between dates in standard ways
  • Maths templates are used to perform calculations and/or present results; some of these are intended for use on content pages, others are backroom boys who do their work behind the scenes
  • Challenge templates are used to challenge dubious or disputed content; these should be used - sparingly - on content pages as needed
  • Standard box templates are used to present information about specific pages or conditions, eg to denote ToDo lysttes; any of these could (and should) be used directly by the appropriate type of content page

Rarely needed

  • Box drawing templates are used to provide boxes for content; any of these could be used directly by a content page

Only used on special occasions

There is no "miscellaneous" category of templates; the template you are looking for will be categorised according to its use and currently resides in one (or more) of the categories above. However, if you know the name of the template, you might prefer to look it up in an alphabetical list.


Nonkiki policy pages

Contact an administrator

To email an administrator: Annoy God. You will receive a response as soon as is reasonably practical.

Pages in the Nonkiki: namespace

All pages that begin with "Nonkiki:" are said to be in the Nonkiki namespace. Such pages define official Nonkiki policy, and may only be changed by an administrator.

List of pages in the Nonkiki: namespace