Template:List/doc

From NPOWiki
Revision as of 12:10, 13 July 2021 by Bobogoobo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This page contains the documentation for Template:List. It includes information about the template, such as usage and categories, and is not displayed when using the template itself.

This template is used to easily format lists of variable length in a consistent and readable manner.

For most lists, such as in navboxes, you will simply call this template with each list item as a separate unnamed parameter. The template takes care of all formatting including item separators and text wrapping.

This template makes use of Lua code at Module:List. Please use the template rather than invoking the module directly.

Parameters

All parameters are optional. A call with no parameters returns nothing. Other than the list items and sep, all the parameters are toggles; defining them with any non-blank text, traditionally an "x", will set them on.

  • unnamed parameters: all items in the list are passed as unnamed parameters. They will be listed in the order they are specified. The only limits are determined by the software and are quite large.
  • sep: the character to use to separate list items. The default is a bullet, •.
  • nosep: define this parameter to specify no separator between list items (setting sep blank won't work).
  • nowrap: define this parameter to force list items not to line break within themselves. I.e, the list will only move to a new line at the separators.
  • nospace: this is a shortcut for nospacebefore and nospaceafter together - see below.
  • nospacebefore: define this parameter to remove any space between a list item and the following separator. For example, this can be used to create a comma-separated list.
  • nospaceafter: define this parameter to remove any space between a separator and the following list item.

Examples

This section is a stub - it only covers the very basics of its subject. More information should be added to make the section informative and useful. If no more information is available, the section should be considered for merging or removal.

If you can correct the issue, please edit the page to do so, then remove this notice.