Difference between revisions of "Help:Lists"

From Twinsuniverse
Jump to: navigation, search
m
(updated to reference list-template)
Line 1: Line 1:
{{Infobox Help}}'''Lists''' are very easy to create here at the Twinsuniverse. There are two main types of lists- numbered and bulleted. Unlike paragraphs, to separate lines of lists you only need one line break, and not two.
+
{{Infobox Help}}'''Lists''' are very easy to create here at the Twinsuniverse. There are two main types of lists: numbered and bulleted. Unlike paragraphs, to separate lines of lists you only need one line break, and not two.
  
 
==Bulleted lists==
 
==Bulleted lists==
Line 49: Line 49:
  
 
==Combinations==
 
==Combinations==
Lists can have more than two levels as well. Now you know listing is really easy, here is a combination example:
+
Lists can have more than two levels as well. Now you know listing is really easy, here is a more complex combination example:
 
  <nowiki>* Quetches
 
  <nowiki>* Quetches
 
*# Twinsen
 
*# Twinsen
Line 78: Line 78:
 
*# Zed
 
*# Zed
 
*#* Mushrooms
 
*#* Mushrooms
 +
 +
==Variable lists==
 +
Maybe you want to render a list of items that are rendered by a template, and you don't know which items will be non-empty. You will want to prevent empty bullets from being rendered, so in that case the above syntax would not work. Using conditional mechanics could become quite tedious, so for that you could use the {{templatelink|list}} template, read its own documentation on how to use it.
 +
 +
The list template can omit empty list items automatically. It renders the items with bullets or numbers, or as a single-line string with separators. It does not support multiple levels of indentation though, and it cannot be embedded safely either.

Revision as of 22:25, 11 June 2014

Help Contents
Lists are very easy to create here at the Twinsuniverse. There are two main types of lists: numbered and bulleted. Unlike paragraphs, to separate lines of lists you only need one line break, and not two.

Bulleted lists

To make a bulleted list, simply put an asterisk (*) at the beginning of each line:

* Twinsen
* Zoé
* Baldino
  • Twinsen
  • Zoé
  • Baldino


To indent one level in a list, simply add more asterisks:

* Quetches
** Twinsen
** Zoé
* Grobos
** Baldino
** Zed
  • Quetches
    • Twinsen
    • Zoé
  • Grobos
    • Baldino
    • Zed

Numbered lists

Numbered lists are the same, except that the # sign is used instead of *:

# Twinsen
# Zoé
# Baldino
  1. Twinsen
  2. Zoé
  3. Baldino

Indenting is also similar:

# Quetches
## Twinsen
## Zoé
# Grobos
## Baldino
## Zed
  1. Quetches
    1. Twinsen
    2. Zoé
  2. Grobos
    1. Baldino
    2. Zed

Combinations

Lists can have more than two levels as well. Now you know listing is really easy, here is a more complex combination example:

* Quetches
*# Twinsen
*#* Melee
*#* Ranged
*#* Magic
*#* Explosive
*# Zoé
*#* Melee
* Grobos
*# Baldino
*#* Melee
*#* Ranged
*# Zed
*#* Mushrooms
  • Quetches
    1. Twinsen
      • Melee
      • Ranged
      • Magic
      • Explosive
    2. Zoé
      • Melee
  • Grobos
    1. Baldino
      • Melee
      • Ranged
    2. Zed
      • Mushrooms

Variable lists

Maybe you want to render a list of items that are rendered by a template, and you don't know which items will be non-empty. You will want to prevent empty bullets from being rendered, so in that case the above syntax would not work. Using conditional mechanics could become quite tedious, so for that you could use the {{list}} template, read its own documentation on how to use it.

The list template can omit empty list items automatically. It renders the items with bullets or numbers, or as a single-line string with separators. It does not support multiple levels of indentation though, and it cannot be embedded safely either.