Difference between revisions of "Template:List"

From Twinsuniverse
Jump to: navigation, search
(added an ordered list feature and updated/fixed documentation)
m
Line 14: Line 14:
 
|{{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}}{{{10|}}}
 
|{{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}}{{{10|}}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
This template wraps up to 10 nonempty strings into an unordered list. If only one string is not empty, it is returned as-is.
+
This template wraps up to 10 nonempty strings into an (un)ordered list. If only one string is not empty, it is returned as-is.
  
 
This is useful if the strings are yet unknown and only need to be wrapped if there are more than one not empty.
 
This is useful if the strings are yet unknown and only need to be wrapped if there are more than one not empty.

Revision as of 00:13, 24 May 2014

This template wraps up to 10 nonempty strings into an (un)ordered list. If only one string is not empty, it is returned as-is.

This is useful if the strings are yet unknown and only need to be wrapped if there are more than one not empty.

Parameters

Ten numbered parameters, no parameter name, case sensitive, all default to not displayed.

  • numeric: whether to render a numeric list instead (defaults to dics bullets, any value will render numeric bullets)

Syntax

{{list|numeric=yes
 |string one
 |string two
 |string three
 |...
 |string ten
}}

Examples

When specifying only five strings:

{{list
 |Ape
 |Bear
 |Chihuahua
 |Donkey
 |Eel
}}
  • Ape
  • Bear
  • Chihuahua
  • Donkey
  • Eel


If only one string is specified:

{{list|only one string this time}}
only one string this time


If the numeric parameter is specified with a nonempty value (it is ignored when only one list item is specified):

{{list|numeric=yes|only one string this time also}}
{{list|numeric=yes
  |string one
  |and another}}
only one string this time also
  1. string one
  2. and another


If all strings are empty or no string is specified, all are effectively omitted resulting in no display at all.