Template:ListExtract/doc

From Archaelund Wiki
< Template:ListExtract
Revision as of 10:38, 30 December 2023 by MikeB (talk | contribs) (Created page with "== Description == This template extracts single items from semicolon-separated lists (i.e. "item1; item2; item3; ..."). == Usage == <pre> {{ListFormat|<semicolon-separated list>|<item index>|<format>|Blank = <text>}} </pre> The numbering of <item index> starts at 1 (not 0). An optional parameter <format> can be specified (see list below), otherwise the item is output as is. Furthermore, an optional parameter ''Blank'' can be provided which replaces empty entries in the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This template extracts single items from semicolon-separated lists (i.e. "item1; item2; item3; ...").

Usage

{{ListFormat|<semicolon-separated list>|<item index>|<format>|Blank = <text>}}

The numbering of <item index> starts at 1 (not 0). An optional parameter <format> can be specified (see list below), otherwise the item is output as is. Furthermore, an optional parameter Blank can be provided which replaces empty entries in the list by arbitrary <text>.

Format options

FormatDescriptionExample output
DiffFormats numerical entries as a bonus/malus using Template:Difference.+1