Difference between revisions of "Module:Cslist/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>RexxS
(update doc for semicolons)
m (8 revisions imported)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{replace|{{replace||template|module}}|Template:|Module:|count=1}}
 
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
Module to implement [[Template:Cslist]], which creates a horizontal list similar to [[Template:Hlist]] but using comma separators instead of mid-dots.
 
Module to implement [[Template:Cslist]], which creates a horizontal list similar to [[Template:Hlist]] but using comma separators instead of mid-dots.
Line 12: Line 11:
 
| <code><nowiki>{{cslist | first item | second item  | third item | etc}}</nowiki></code> → {{cslist | first item | second item  | third item | etc}}
 
| <code><nowiki>{{cslist | first item | second item  | third item | etc}}</nowiki></code> → {{cslist | first item | second item  | third item | etc}}
 
|-
 
|-
| <code><nowiki>{{sslist | first item | second item  | third item | etc |semi=true}}</nowiki></code> → {{cslist | first item | second item  | third item | etc |semi=true}}
+
| <code><nowiki>{{cslist | first item | second item  | third item | etc |semi=true}}</nowiki></code> → {{cslist | first item | second item  | third item | etc |semi=true}}
 
|}
 
|}
  

Latest revision as of 15:59, 26 September 2020

Module to implement Template:Cslist, which creates a horizontal list similar to Template:Hlist but using comma separators instead of mid-dots.

It can take as many list items as desired, and also an optional |semi=, which when set to true or yes will use a semicolon as separator in place of the comma.

Note: the unordered list which is generated is good for accessibility, but really is only useful in tables and infoboxes as an alternative to using {{hlist}}. It should not be used in running prose.

Examples

{{cslist | first item | second item | third item | etc}}
  • first item
  • second item
  • third item
  • etc
{{cslist | first item | second item | third item | etc |semi=true}}
  • first item
  • second item
  • third item
  • etc