Template:List

From NPOWiki
Revision as of 21:46, 21 August 2020 by Bobogoobo (talk | contribs) (Created page with "{{#invoke:List|main}}<noinclude>{{documentation}}</noinclude>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation [edit]

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, &bull;.
  • 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

The above documentation is transcluded from Template:List/doc.