Template:Comma separated entries: Difference between revisions
Appearance
Content deleted Content added
new version which substitutes cleanly, and strips whitespace |
Switch to using Module:Separated entries |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{<includeonly>safesubst:</includeonly>#invoke:Separated entries|comma}}<noinclude> |
|||
{{{{{|safesubst:}}}#if:1|{{{1|}}}}}{{{{{|safesubst:}}}#if:{{{2|}}}|{{{{{|safesubst:}}}#if:{{{1|}}}|, {{{{{|safesubst:}}}#if:1|{{{2}}}}}|{{{2}}}}}}}{{{{{|safesubst:}}}#if:{{{3|}}}|{{{{{|safesubst:}}}#if:{{{1|}}}{{{2|}}}|, {{{{{|safesubst:}}}#if:1|{{{3}}}}}|{{{3}}}}}}}{{{{{|safesubst:}}}#if:{{{4|}}}|{{{{{|safesubst:}}}#if:{{{1|}}}{{{2|}}}{{{3|}}}|, {{{{{|safesubst:}}}#if:1|{{{4}}}}}|{{{4}}}}}}}<noinclude> |
|||
{{documentation}} |
{{documentation}} |
||
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> |
|||
</noinclude> |
</noinclude> |
Latest revision as of 18:05, 26 May 2015
This template is used on approximately 453,000 pages, or roughly 1% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
This template is used primarily in infoboxes to create a comma-delimited collection of items, only adding the commas where needed.
For lists of items, without bullets, use {{plainlist}}.
Usage
Typing:
{{comma separated entries|entry1|entry2|entry3|entry4|entry5|...}}
Results in:
- entry1, entry2, entry3, entry4, entry5, ...
Example
Code | Result |
---|---|
{{comma separated entries|entry1|entry2|entry3|entry4}} |
entry1, entry2, entry3, entry4 |
{{comma separated entries| |entry2|entry3|entry4}} |
entry2, entry3, entry4 |
{{comma separated entries|entry1| |entry3|entry4}} |
entry1, entry3, entry4 |
{{comma separated entries|entry1|entry2| |entry4}} |
entry1, entry2, entry4 |
{{comma separated entries|entry1|entry2|entry3| }} |
entry1, entry2, entry3 |
{{comma separated entries|entry1| | | }} |
entry1 |
{{comma separated entries| |entry2| | }} |
entry2 |
{{comma separated entries| | |entry3| }} |
entry3 |
{{comma separated entries| | | |entry4}} |
entry4 |
{{comma separated entries|entry1|entry2}} |
entry1, entry2 |
{{comma separated entries| | | | }} |
|
{{comma separated entries|entry1|entry2|entry3|entry4|entry5|entry6}} |
entry1, entry2, entry3, entry4, entry5, entry6 |
See also
- {{br separated entries}} (displays a list with an item per line)
- {{plainlist}} (same as above, but using regular unordered list markup)
- {{flatlist}} (converts a regular unordered list into an inline list separated by interpuncts)
- {{pagelist}} (formats a list of internal links as prose, using commas or "and" when appropriate)
- {{prose list}} (formats a list using commas and "and" before the last item)
- {{Catalog lookup link}}
- Module:Separated entries, the Lua module used to realize this template.