Template:List

This template creates a list of a variable amount of (only) non-empty strings. This is useful if the strings are yet to be determined by transclusion context, and only need to be included in the list if they are actually non-empty. The order of the strings will be honoured, in respect to their position number. Gaps are allowed and will be omitted.

The list will either use list bullets, or implode the items with a separator into a single string.

The list is terminated as soon as it detects an empty string, but this may be turned off for a specified range of strings.

Note: Line-breaks in the middle of any of the strings will break the list in two, restarting any numbering, so don't use them.

Parameters
Unlimited unnamed parameters are accepted, case sensitive, all default to not displayed.
 * separator: The string used to glue all values together (any non-empty value will disable list bullets/numbers, which are enabled by default)
 * numeric: Whether to render a numeric (ordered) list instead of the default bulleted list (any value other than false will do, defaults to false, ignored if separator is non-empty)
 * range: The minimum number of elements in the list to expect, before empty strings may terminate it (any digit greater than zero, defaults to zero)

''Note: The range does not define the resulting size of the list, but only the size within which strings are allowed to be empty. Its value should not be greater than necessary, for best performance.''

Examples
When specifying only three strings:


 * ApeBearCow

If numeric is specified with any (empty) value other than "false":


 * string onestring two
 * another string one</li>another string two</li></ol>

If the first string is empty or not specified, the list is terminated immediately and no list bullets will be displayed:

Similarly, any other empty string will terminate the list as well, ignoring any further strings:


 * one</li>two</li>three</li></ol>
 * one</li>two</li>three</li></ol>

But if range is specified and greater than zero, that many strings won't terminate the list even if they are empty:


 * one</li>two</li>three</li>seven</li></ol>

Avoid using line-breaks within any of the strings, because they will totally mess up the list:


 * one string that has a</li></ol>
 * multi-line value<ol><li>another</li></ol>

Instead of listing the strings as individual list items, using separator will glue them together with the specified string (substitute spaces with the html-entity):


 * one, two, three

To glue all strings together without a separator, specify an empty span element as separator:


 * one two  three

The value of the separator can be the result of a condition, because it will be ignored if it is empty:


 * <ol><li>one</li><li>two</li><li>three</li></ol>

If only one string is specified, it will still be bulleted or numbered:


 * <ul><li>only one string this time</li></ul>
 * <ol><li>only one string this time</li></ol>

This can be prevented if a single item is expected in advance, by specifying any separator:


 * a single string doesn't get a separator

Multiple lists can also be nested like this: