Template:NamedGroup/doc: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
This template takes a list of items with an optional name and formats them for insertion into a table. Used to process individual list from within the [[Template:NamedList]] template.
This template takes a list of items with an optional name and formats them for insertion into a table. Used to process individual list from within the [[Template:NamedList]] template.


Examples:
Titled group with << >> list:
<pre>Title << item 1, item 2, item 3>></pre>
<pre>{{NamedGroup|Title << item 1, item 2, item 3>>}}</pre>
{{NamedGroup|Title << item 1, item 2, item 3>>}}
{{NamedGroup|Title << item 1, item 2, item 3>>}}
<pre>item 1, item 2, item 3 | Title</pre>
Group with title parameter and ~~ delimiter:
{{NamedGroup|item 1, item 2, item 3 | Title}}
<pre>{{NamedGroup|item 1, item 2, item 3 | Title|~~}}</pre>
<pre>this list, has no title, will default to "list"</pre>
{{NamedGroup|item 1, item 2, item 3 | Title|~~}}
{{NamedGroup|this list, has no title, will default to "list"}}
Group with no title and "-" list delimiter:
<pre> {{NamedGroup|item 1, item2, item 3}}</pre>
{{NamedGroup|item 1, item2, item 3|||-}}
<templatedata>
{
"params": {
"1": {
"description": "List of items in group (optionally << >> encapsed with group name in front)"
},
"2": {
"description": "Title of group (if not included in parameter 1)"
},
"3": {
"description": "Delimiter between group title and list of items"
},
"4": {
"description": "Delimiter between list items"
}
}
}
</templatedata>

Revision as of 21:09, 13 April 2022

This template takes a list of items with an optional name and formats them for insertion into a table. Used to process individual list from within the Template:NamedList template.

Titled group with << >> list:

{{NamedGroup|Title << item 1, item 2, item 3>>}}
Title||item 1,item 2,item 3

Group with title parameter and ~~ delimiter:

{{NamedGroup|item 1, item 2, item 3 | Title|~~}}
Title~~item 1,item 2,item 3

Group with no title and "-" list delimiter:

 {{NamedGroup|item 1, item2, item 3}}
item 1-item2-item 3

No description.

Template parameters

ParameterDescriptionTypeStatus
11

List of items in group (optionally << >> encapsed with group name in front)

Unknownoptional
22

Title of group (if not included in parameter 1)

Unknownoptional
33

Delimiter between group title and list of items

Unknownoptional
44

Delimiter between list items

Unknownoptional
Cookies help us deliver our services. By using our services, you agree to our use of cookies.