Template:NamedList/doc: Difference between revisions

Template page
(Created page with "{{Document}} This template parses a list (or multiple lists) of items and displays them, making use of Template:NamedGroup. Items within a list should be comma-delimited, and separate groups should be semicolo-delimited. Each list can be preceded by a title, in which case the list itself should be encapsed in << >> marks. Simple list with no title: <pre>{{NamedList| item 1, item 2}}</pre> {{NamedList| item 1, item 2}} Multiple named lists: <pre>{{NamedList | titl...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Document}}
{{Documentation}}
This template parses a list (or multiple lists) of items and displays them, making use of [[Template:NamedGroup]].
This template parses a list (or multiple lists) of items and displays them, making use of [[Template:NamedGroup]].


Line 11: Line 11:
<pre>{{NamedList | title <<element 1, element 2 >>; title2 <<element 2, element 3>>}}</pre>
<pre>{{NamedList | title <<element 1, element 2 >>; title2 <<element 2, element 3>>}}</pre>
  {{NamedList | title <<element 1, element 2 >>; title2 <<element 2, element 3>>}}
  {{NamedList | title <<element 1, element 2 >>; title2 <<element 2, element 3>>}}
Infobox style:
<pre>{{NamedList | title <<element 1, element 2 >>; title2 <<element 2, element 3>> | infobox = 1}}</pre>
{{NamedList | title <<element 1, element 2 >>; title2 <<element 2, element 3>> | infobox = 1}}
<templatedata>
<templatedata>
{
{
Line 23: Line 28:
"3": {
"3": {
"description": "Optional text, code, or formatting to place in front of each group"
"description": "Optional text, code, or formatting to place in front of each group"
},
"4": {
"description": "Delimiter to place between groups of formatted lists",
"default": "<br />"
}
}
}
}
}
}
</templatedata>
</templatedata>

Latest revision as of 03:32, 14 April 2022

This template parses a list (or multiple lists) of items and displays them, making use of Template:NamedGroup.

Items within a list should be comma-delimited, and separate groups should be semicolo-delimited. Each list can be preceded by a title, in which case the list itself should be encapsed in << >> marks.

Simple list with no title:

{{NamedList| item 1, item 2}}
List||item 1,item 2


Multiple named lists:

{{NamedList | title <<element 1, element 2 >>; title2 <<element 2, element 3>>}}
title||element 1,element 2
title2||element 2,element 3


Infobox style:

{{NamedList | title <<element 1, element 2 >>; title2 <<element 2, element 3>> | infobox = 1}}

| class="infobox-parameter" | title||element 1,element 2| class="infobox-parameter" | title2||element 2,element 3

No description.

Template parameters

ParameterDescriptionTypeStatus
11

String to parse, containing a list or multiple list of items, each with optional title and << >> encapsulation

Unknownrequired
22

Title to use for lists that do not have a specified title

Unknownoptional
33

Optional text, code, or formatting to place in front of each group

Unknownoptional
44

Delimiter to place between groups of formatted lists

Default
<br />
Unknownoptional
Cookies help us deliver our services. By using our services, you agree to our use of cookies.