Template:List

From Zelda Wiki, the Zelda encyclopedia
Jump to navigation Jump to search


Purpose

For information on how to create bulleted or numbered lists, see Help:Lists.

Creating plain (unbulleted) lists in infoboxes and other contexts where bullet points or other list markers are not desired.

Usage

Single-line formatMulti-line format

Use the single-line format when the list contains only a few short entries.

{{List|<entry1>, <entry2>, <entryN>}}

Use the multi-line format when the list contains many items, or when each list item's wikitext is quite long—this can occur when list items have references next to them, for example. This method may also feel more natural when the list items are sentence fragments.

{{List|
 <entry1>, 
 <entry2>, 
 <entryN>,
}}
Note the trailing comma after the last list entry. Trailing commas make diffs cleaner when appending an element to a list, and are standard practice in most modern coding languages.

If the list items themselves contain commas, pipe characters (|) can be used to separate the list items instead. In most situations, however, comma separators are preferred due to greater source code readability and consistency with Zelda Wiki's other templates, namely Category:List templates.

Examples

#InputOutput
1
{{List|
 Din,
 Farore,
 Nayru,
}}
  • Din
  • Farore
  • Nayru
Thousands separators are not treated as list separators.
2
{{List|
 10 Rupees,
 100 Rupees,
 1,000 Rupees,
}}
  • 10 Rupees
  • 100 Rupees
  • 1,000 Rupees
Using pipe separators when list items contain commas.
3
{{List
 |Link, Hero of Time
 |Zelda, Princess of Hyrule
 |Ganon, King of Thieves
}}
  • Link, Hero of Time
  • Zelda, Princess of Hyrule
  • Ganon, King of Thieves

Guidelines

The template input should only contain list items and should not be used as a blanket replacement for all <br> tags. Having things in the list that aren't actually list items results in poor HTML semantics which negatively affects Zelda Wiki's accessibility to the visually impaired via screen readers.

This template need not be used within Template:Infobox Game Blocks, as the latter also supports list creation via comma separation.

TFH Green Link ok.png
Do
TFH Red Link desperate.png
Don't
The first list contains these items:
{{List
|item1
|item2
|item3
}}
The second list contains these items:
{{List
|item4
|item5
|item6
}}
{{List
|The first list contains these items:
|item1
|item2
|item3
|The second list contains these items:
|item4
|item5
|item6
}}

Use definition lists where appropriate. For the time being, {{New Line}} must be inserted as a workaround for definition lists to work correctly in infoboxes.

{{Infobox Book
|image= File:BotW Piggyback Standard Edition Guide.png
|released= {{New Line}}
;''Standard/Collector's Edition''
:March 3, 2017
;''Deluxe Edition''
:April 11, 2017,
;''Expanded Edition''
:February 21, 2018
}}
{{Infobox Book
|image= File:BotW Piggyback Standard Edition Guide.png
|released=
{{List|
 {{Small|'''''Standard/Collector's Edition'''''}},
 March 3{{,}} 2017,
 {{Small|'''''Deluxe Edition'''''}},
 April 11{{,}} 2017,
 {{Small|'''''Expanded Edition'''''}},
 February 21{{,}} 2018
}}
}}

See Also

The above documentation is transcluded from Template:List/Documentation. (edit | history)