Template:ListFormat/doc: Difference between revisions

From Archaelund Wiki
(Created page with "== Description == This template generates various output formats from semicolon-separated lists (i.e. "item1; item2; item3; ..."). == Usage == <pre> {{ListFormat|<semicolon-s...")
 
No edit summary
Line 14: Line 14:
<tr><td>Diamonds</td><td>Places all items in a single line, separated by diamonds.</td><td>{{ListFormat|item1; item2; item3|Diamonds}}</td></tr>
<tr><td>Diamonds</td><td>Places all items in a single line, separated by diamonds.</td><td>{{ListFormat|item1; item2; item3|Diamonds}}</td></tr>
<tr><td>Arrows</td><td>Places all items in a single line, separated by right arrows.</td><td>{{ListFormat|item1; item2; item3|Arrows}}</td></tr>
<tr><td>Arrows</td><td>Places all items in a single line, separated by right arrows.</td><td>{{ListFormat|item1; item2; item3|Arrows}}</td></tr>
<tr><td>Blanks</td><td>Places all items in a single line, separated by blank spaces.</td><td>{{ListFormat|item1; item2; item3|Blanks}}</td></tr>
<tr><td>UList</td><td>Generates an unordered (bulleted) list.</td><td>{{ListFormat|item1; item2; item3|UList}}</td></tr>
<tr><td>UList</td><td>Generates an unordered (bulleted) list.</td><td>{{ListFormat|item1; item2; item3|UList}}</td></tr>
<tr><td>UList0</td><td>Generates an unordered (bulleted) list with zero margin above and below. Prevents alignment issues in multi-column lists.</td><td>{{ListFormat|item1; item2; item3|UList0}}</td></tr>
<tr><td>UList0</td><td>Generates an unordered (bulleted) list with zero margin above and below. Prevents alignment issues in multi-column lists.</td><td>{{ListFormat|item1; item2; item3|UList0}}</td></tr>
<tr><td>OList</td><td>Generates an ordered (numbered) list.</td><td>{{ListFormat|item1; item2; item3|OList}}</td></tr>
<tr><td>OList</td><td>Generates an ordered (numbered) list.</td><td>{{ListFormat|item1; item2; item3|OList}}</td></tr>
<tr><td>OList0</td><td>Generates an ordered (numbered) list with zero margin above and below. Prevents alignment issues in multi-column lists.</td><td>{{ListFormat|item1; item2; item3|OList0}}</td></tr>
<tr><td>SList0</td><td>A special unordered list with circles instead of bullets intended for use on the main page</td><td>{{ListFormat|item1; item2; item3|SList0}}</td></tr>
</table>
</table>

Revision as of 12:07, 21 March 2020

Description

This template generates various output formats from semicolon-separated lists (i.e. "item1; item2; item3; ...").

Usage

{{ListFormat|<semicolon-separated list>|<format>}}

Make sure that there are no leading or trailing semicolons in the input list, since this may cause empty entries in the output list for some formats.

Format options

FormatDescriptionExample output
BulletsPlaces all items in a single line, separated by bullets.item1 • item2 • item3
DiamondsPlaces all items in a single line, separated by diamonds.item1 ♦ item2 ♦ item3
ArrowsPlaces all items in a single line, separated by right arrows.item1 → item2 → item3
BlanksPlaces all items in a single line, separated by blank spaces.item1 item2 item3
UListGenerates an unordered (bulleted) list.
  • item1
  • item2
  • item3
UList0Generates an unordered (bulleted) list with zero margin above and below. Prevents alignment issues in multi-column lists.
  • item1
  • item2
  • item3
OListGenerates an ordered (numbered) list.
  1. item1
  2. item2
  3. item3