Template:List

From PathfinderWiki
Template documentation (for the above template, sometimes hidden or invisible)
Subpages of this template:

{{List}} is a utility template for forming different types of lists. It serves as a front end for Module:List.

Usage

*/# vs. {{List}} vs. {{Columns-list}} vs. {{Div col}}

  • When to use * or #: If you need basic and multi-level ordered and unordered lists, but don't need custom formatting or columns.
  • When to use {{List}}: If you need basic, single-level ordered or unordered lists where you need to customize general list formatting, run the content in columns, or run the content horizontally.
  • When to use {{Columns-list}}: If you need complex or multi-level lists to run in columns, or are using Dynamic Page List (<dpl>, {{#tag:dpl}}, {{#dpl}}) to generate * or # lists.
  • When to use {{Div col}}: If you need non-list content, or a mix of lists and non-list content, to run in columns.

Basic

{{List
| list item 1
| list item 2
| ...
}}

All parameters

{{List
| type  = 
| start = 
<!-- styling options -->
| liststyle     = 
| itemstyle     = 
| class         =
| columnar      = 
| columns       = 
| indent        = 
}}

All parameters are optional.

type
All type functions supported by Module:List.
Function name Produces Example output
bulleted Bulleted lists
  • First item
  • Second item
  • Third item
horizontal Horizontal bulleted lists
  • First item
  • Second item
  • Third item
ordered Ordered lists (numbered lists and alphabetical lists, with optional custom start)
  1. Fifth item
  2. Sixth item
  3. Seventh item
horizontal_ordered Horizontal ordered lists
  1. First item
  2. Second item
  3. Third item
liststyle
CSS styles for the list.
itemstyle
CSS styles for list items.
class
CSS class for the list.
columnar
Shortcut to enable CSS columns and use default values (4 12em). Any value, such as yes (or even no) enables this setting, and setting any 'columns value overrides it.
columns: Define specific CSS column values, such as 3 10em for a maximum of 3 columns at 10 em units wide each.
indent
Define an indent for horizontal lists in em units. Must be a number, such as 2.

Examples

Basic list

{{List
| list item 1
| list item 2 
| ...
}}
  • list item 1
  • list item 2
  • ...

Ordered list with optional start

{{List
| type  = ordered
| start = 10
| list item 10
| list item 11
| ...
}}
  1. list item 10
  2. list item 11
  3. ...

Default columnar list

{{List
| columnar = yes
| list item 1
| list item 2
| list item 3
| list item 4
| list item 5
| list item 6
| list item 7
| list item 8
}}
  • list item 1
  • list item 2
  • list item 3
  • list item 4
  • list item 5
  • list item 6
  • list item 7
  • list item 8

Horizontal list with custom indent and style

{{List
| type = horizontal
| indent = 0
| itemstyle = margin: 0;
| list item 1
| list item 2
| list item 3
| list item 4
| list item 5
| list item 6
| list item 7
| list item 8
}}
  • list item 1
  • list item 2
  • list item 3
  • list item 4
  • list item 5
  • list item 6
  • list item 7
  • list item 8