Template:NamedGroup: Difference between revisions

Template page
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#arraydefine:items|{{#rreplace:{{{1}}}|([^{}]*{)?([^{}]*)}?|\2}}}}{{#ifexpr: {{#count: {{{1}}} |{}} | {{#explode: {{{1}}} |{}} | {{{2|List}}} }}{{!!}}{{#arrayprint:items|, }}<noinclude>{{/doc}}</noinclude>
<includeonly>{{#arraydefine:items|{{#rreplace:{{{1}}}|([^<>]*<<)?([^<>]*)>>?|\2}}}}{{#ifexpr:{{#count: {{{1}}} |<<}}| {{#explode: {{{1}}} |<<}}| {{{2|List}}} }}{{{3|{{!!}}}}}{{#arrayprint:items|{{{4|,}}}}}</includeonly><noinclude>{{/doc}}</noinclude>

Latest revision as of 03:38, 14 April 2022

Template documentation[view][edit][history][purge]
This documentation is transcluded from Template:NamedGroup/doc. Changes can be proposed in the talk page.

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.