Difference between revisions of "Template:Value list"
(allow the input to use bold and italics) |
Dinoguy1000 (talk | contribs) (prettify output code a bit (this is mainly to benefit the documentation; I don't think it'll affect anything else but could be wrong)) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{ #if: {{{1|}}} | |
− | + | | {{ #arraydefine: @vl_list | {{{1}}} | * }}{{ #arraysearcharray: @vl_list | @vl_list | /.+/ }}{{ #ifeq: {{ #arraysize: @vl_list }} | 1 | |
− | | {{ | + | | {{ #arrayprint: @vl_list || $list_item | $list_item[[{{ #if: 1 | {{{2}}} }}::{{unlink|{{ #explode: $list_item | <ref }}}}| ]] }} |
− | + | | {{ #arrayprint: @vl_list || $list_item | <nowiki/> | |
− | + | * $list_item[[{{ #if: 1 | {{{2}}} }}::{{unlink|{{ #explode: $list_item | <ref }}}}| ]] | |
− | + | }} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}} | }} | ||
− | }} | + | }}<noinclude> |
{{documentation}}</noinclude> | {{documentation}}</noinclude> |
Revision as of 22:36, 14 December 2019
{{Value list}}
is used to apply properties to a list of values in link bracketed bulleted list format, without worrying about references or piped links.
Whether the list appears linked or not depends on the property type.
Usage
{{Value list|list of values|property to apply}}
Example
{{Value list| * [[Blue-Eyes White Dragon]] * [[Obelisk the Tormentor (original)|Obelisk the Tormentor]] * [[Luster Dragon 2|Luster Dragon #2]]<ref group="Note">Only in the anime</ref> |Cards used }}
becomes...
* [[Blue-Eyes White Dragon]][[Cards used::Blue-Eyes White Dragon| ]] * [[Obelisk the Tormentor (original)|Obelisk the Tormentor]][[Cards used::Obelisk the Tormentor (original)| ]] * [[Luster Dragon 2|Luster Dragon #2]][Note 1][[Cards used::Luster Dragon 2| ]]
Notes
- ↑ Only in the anime
This is typically used in templates. e.g. {{Value list|{{{cards}}}|Cards used}}
allows a bulleted list of cards to be added after |cards =