Difference between revisions of "Template:Cslist/doc"

From blackwiki
Jump to navigation Jump to search
imported>RexxS
(Uses TemplateStyles)
imported>Jonesey95
(update and copy edit.)
Line 3: Line 3:
 
{{lua|Module:Cslist}}
 
{{lua|Module:Cslist}}
 
<!-- 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]]) -->
Template to create a horizontal list similar to [[Template:Hlist]] but using comma separators instead of mid-dots. It allows an optional {{para|semi}}, which when set to <code>true</code> or <code>yes</code> will use a semicolon as separator in place of the comma.
+
The "cslist" (comma-separated list) template allows editors to create a horizontal list similar to [[Template:Hlist]], but using comma separators instead of mid-dots.  
 +
 
 +
The template allows an optional {{para|semi}}, which when set to <code>true</code> or <code>yes</code> will use a semicolon as separator instead of a comma.
  
 
It calls [[Module:Cslist]] to process an arbitrary number of list items and generate the list.
 
It calls [[Module:Cslist]] to process an arbitrary number of list items and generate the list.
  
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 {{tl|hlist}}. It should not be used in running prose.
+
Note: the unordered list which is generated is good for [[Wikipedia:Manual of Style/Accessibility|accessibility]], and is intended for use only in tables and infoboxes as an alternative to {{tl|hlist}}. It should not be used in article prose.
  
== Example ==
+
== Examples ==
 
{| class="wiktable"
 
{| class="wiktable"
 
|-
 
|-

Revision as of 18:08, 16 January 2019

Script error: No such module "Uses TemplateStyles".

The "cslist" (comma-separated list) template allows editors to create a horizontal list similar to Template:Hlist, but using comma separators instead of mid-dots.

The template allows an optional |semi=, which when set to true or yes will use a semicolon as separator instead of a comma.

It calls Module:Cslist to process an arbitrary number of list items and generate the list.

Note: the unordered list which is generated is good for accessibility, and is intended for use only in tables and infoboxes as an alternative to {{hlist}}. It should not be used in article 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

See also

Template:Navbox lists