Editing Module:List/doc

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page is not enabled for semantic in-text annotations due to namespace restrictions. Details about how to enable the namespace can be found on the configuration help page.

Latest revision Your text
Line 1: Line 1:
{{used in system|in [[MediaWiki:Citethispage-content]]}}
 
{{module rating|protected}}
 
{{Lua|Module:TableTools|Module:Arguments}}
 
{{Uses TemplateStyles|Template:Plainlist/styles.css|Template:Hlist/styles.css}}
 
 
 
This module outputs various kinds of lists. At present, it supports bulleted lists, unbulleted lists, horizontal lists, ordered lists (numbered or alphabetical), and horizontal ordered lists. It allows for easy css styling of the list or of the individual list items.
 
This module outputs various kinds of lists. At present, it supports bulleted lists, unbulleted lists, horizontal lists, ordered lists (numbered or alphabetical), and horizontal ordered lists. It allows for easy css styling of the list or of the individual list items.
  
 
== Usage ==
 
== Usage ==
  
=== Quick usage ===
+
; Quick usage
{{pre|<nowiki>{{</nowiki>#invoke:list<nowiki>|</nowiki>''function''<nowiki>|</nowiki>''first item''<nowiki>|</nowiki>''second item''<nowiki>|</nowiki>''third item''<nowiki>|</nowiki>...<nowiki>}}</nowiki>}}
+
 
 +
{{pre2|<nowiki>{{</nowiki>#invoke:list<nowiki>|</nowiki>''function''<nowiki>|</nowiki>''first item''<nowiki>|</nowiki>''second item''<nowiki>|</nowiki>''third item''<nowiki>|</nowiki>...<nowiki>}}</nowiki>}}
 +
 
 +
; All parameters
  
=== All parameters ===
+
{{pre2|
{{pre|
 
 
<nowiki>{{</nowiki>#invoke:list<nowiki>|</nowiki>''function''
 
<nowiki>{{</nowiki>#invoke:list<nowiki>|</nowiki>''function''
 
<nowiki>|</nowiki>''first item''<nowiki>|</nowiki>''second item''<nowiki>|</nowiki>''third item''<nowiki>|</nowiki>...
 
<nowiki>|</nowiki>''first item''<nowiki>|</nowiki>''second item''<nowiki>|</nowiki>''third item''<nowiki>|</nowiki>...
Line 28: Line 25:
 
}}
 
}}
  
=== Arguments passed from parent template ===
+
; Arguments passed from parent template
{{pre|<nowiki>{{</nowiki>#invoke:list<nowiki>|</nowiki>''function''<nowiki>}}</nowiki>}}
+
 
 +
{{pre2|<nowiki>{{</nowiki>#invoke:list<nowiki>|</nowiki>''function''<nowiki>}}</nowiki>}}
 +
 
 +
; Functions
  
=== Functions ===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 37: Line 36:
 
! Produces
 
! Produces
 
! Example output
 
! Example output
! Template using the function
 
 
|-
 
|-
 
| <code>bulleted</code>
 
| <code>bulleted</code>
 
| Bulleted lists
 
| Bulleted lists
 
| {{#invoke:list|bulleted|First item|Second item|Third item}}
 
| {{#invoke:list|bulleted|First item|Second item|Third item}}
| {{tlx|bulleted list}}
 
 
|-
 
|-
 
| <code>unbulleted</code>
 
| <code>unbulleted</code>
 
| Unbulleted lists
 
| Unbulleted lists
 
| {{#invoke:list|unbulleted|First item|Second item|Third item}}
 
| {{#invoke:list|unbulleted|First item|Second item|Third item}}
| {{tlx|unbulleted list}}
 
 
|-
 
|-
 
| <code>horizontal</code>
 
| <code>horizontal</code>
 
| Horizontal bulleted lists
 
| Horizontal bulleted lists
 
| {{#invoke:list|horizontal|First item|Second item|Third item}}
 
| {{#invoke:list|horizontal|First item|Second item|Third item}}
| {{tlx|hlist}}
 
 
|-
 
|-
 
| <code>ordered</code>
 
| <code>ordered</code>
 
| Ordered lists (numbered lists and alphabetical lists)
 
| Ordered lists (numbered lists and alphabetical lists)
 
| {{#invoke:list|ordered|First item|Second item|Third item}}
 
| {{#invoke:list|ordered|First item|Second item|Third item}}
| {{tlx|ordered list}}
 
 
|-
 
|-
 
| <code>horizontal_ordered</code>
 
| <code>horizontal_ordered</code>
 
| Horizontal ordered lists
 
| Horizontal ordered lists
 
| {{#invoke:list|horizontal_ordered|First item|Second item|Third item}}
 
| {{#invoke:list|horizontal_ordered|First item|Second item|Third item}}
| {{tlx|horizontal ordered list}}
 
 
|}
 
|}
  
 
== Parameters ==
 
== Parameters ==
 +
 
* Positional parameters (<code>1</code>, <code>2</code>, <code>3</code>...) - these are the list items. If no list items are present, the module will output nothing.
 
* Positional parameters (<code>1</code>, <code>2</code>, <code>3</code>...) - these are the list items. If no list items are present, the module will output nothing.
 
* <code>start</code> - sets the start item for ordered lists. This can be a start number for numbered lists, or a start letter for alphabetical lists. Horizontal ordered lists only support numbers.
 
* <code>start</code> - sets the start item for ordered lists. This can be a start number for numbered lists, or a start letter for alphabetical lists. Horizontal ordered lists only support numbers.
 
* <code>type</code> - the type of marker used in ordered lists. Possible values are "1" for numbers (the default), "A" for uppercase letters, "a" for lowercase letters, "I" for uppercase [[Roman numerals]], and "i" for lowercase Roman numerals. Not supported in horizontal ordered lists. See also the <code>list_style_type</code> parameter.
 
* <code>type</code> - the type of marker used in ordered lists. Possible values are "1" for numbers (the default), "A" for uppercase letters, "a" for lowercase letters, "I" for uppercase [[Roman numerals]], and "i" for lowercase Roman numerals. Not supported in horizontal ordered lists. See also the <code>list_style_type</code> parameter.
* <code>list_style_type</code> - the type of marker used in ordered lists. This uses CSS styling, and has more types available than the <code>type</code> parameter, which uses an [[html attribute]]. Possible values are listed at [https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type MDN's list-style-type page]. Support may vary by browser. <code>list-style-type</code> is an alias for this parameter.
+
* <code>list_style_type</code> - the type of marker used in ordered lists. This uses CSS styling, and has more types available than the <code>type</code> parameter, which uses an [[html attribute]]. Possible values are listed at [http://www.w3schools.com/cssref/pr_list-style-type.asp W3schools' list-style-type page]. Support may vary by browser. <code>list-style-type</code> is an alias for this parameter.
 
* <code>class</code> - a custom class for the {{tag|div}} tags surrounding the list, e.g. <code>plainlinks</code>.
 
* <code>class</code> - a custom class for the {{tag|div}} tags surrounding the list, e.g. <code>plainlinks</code>.
 
* <code>style</code> - a custom css style for the {{tag|div}} tags surrounding the list, e.g. <code>font-size: 90%;</code>.
 
* <code>style</code> - a custom css style for the {{tag|div}} tags surrounding the list, e.g. <code>font-size: 90%;</code>.
Line 80: Line 74:
 
== Examples ==
 
== Examples ==
  
=== Bulleted lists ===
+
; Bulleted lists
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
 
! Code !! Result
 
! Code !! Result
Line 94: Line 89:
 
|}
 
|}
  
=== Unbulleted lists ===
+
; Unbulleted lists
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
 
! Code !! Result
 
! Code !! Result
Line 108: Line 104:
 
|}
 
|}
  
=== Horizontal lists ===
+
; Horizontal lists
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
 
! Code !! Result
 
! Code !! Result
Line 119: Line 116:
 
|}
 
|}
  
=== Ordered lists ===
+
; Unbulleted lists
 +
 
 +
{| class="wikitable"
 +
! Code !! Result
 +
|-
 +
| <code><nowiki>{{#invoke:list|unbulleted|First item|Second item|Third item}}</nowiki></code>
 +
| {{#invoke:list|unbulleted|First item|Second item|Third item}}
 +
|-
 +
| <code><nowiki>{{#invoke:list|unbulleted|First item|Second item|Third item|item_style=color:blue;}}</nowiki></code>
 +
| {{#invoke:list|unbulleted|First item|Second item|Third item|item_style=color:blue;}}
 +
|-
 +
| <code><nowiki>{{#invoke:list|unbulleted|First item|Second item|Third item|item1_style=background-color:yellow;|item2_style=background-color:silver;}}</nowiki></code>
 +
| {{#invoke:list|unbulleted|First item|Second item|Third item|item1_style=background-color:yellow;|item2_style=background-color:silver;}}
 +
|}
 +
 
 +
; Ordered lists
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
 
! Code !! Result
 
! Code !! Result
Line 129: Line 142:
 
| {{#invoke:list|ordered|First item|Second item|Third item|start=3}}
 
| {{#invoke:list|ordered|First item|Second item|Third item|start=3}}
 
|-
 
|-
| Lowercase [[Roman numerals]]: <code><nowiki>{{#invoke:list|ordered|First item|Second item|Third item|type=i}}</nowiki></code>
+
| <code><nowiki>{{#invoke:list|ordered|First item|Second item|Third item|type=i}</nowiki></code>
 
| {{#invoke:list|ordered|First item|Second item|Third item|type=i}}
 
| {{#invoke:list|ordered|First item|Second item|Third item|type=i}}
 
|-
 
|-
| Lowercase [[Greek alphabet]]: <code><nowiki>{{#invoke:list|ordered|First item|Second item|Third item|list_style_type=lower-greek}}</nowiki></code>
+
| <code><nowiki>{{#invoke:list|ordered|First item|Second item|Third item|list_style_type=lower-greek}}</nowiki></code>
 
| {{#invoke:list|ordered|First item|Second item|Third item|list_style_type=lower-greek}}
 
| {{#invoke:list|ordered|First item|Second item|Third item|list_style_type=lower-greek}}
 
|}
 
|}
  
=== Horizontal ordered lists ===
+
; Horizontal ordered lists
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
 
! Code !! Result
 
! Code !! Result
Line 149: Line 163:
 
| {{#invoke:list|horizontal_ordered|First item|Second item|Third item|indent=2}}
 
| {{#invoke:list|horizontal_ordered|First item|Second item|Third item|indent=2}}
 
|}
 
|}
 
== Tracking/maintenance category ==
 
* {{clc|List templates with deprecated parameters}}
 
  
 
== See also ==
 
== See also ==
* [[Module:Separated entries]]
 
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
+
* [[Module:Br separated entries]]
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Modules that add a tracking category]]
 
}}</includeonly>
 

Please note that all contributions to Yugipedia are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International License (see Yugipedia:Licensing for more details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)
Preview page with this template
Below are some commonly used wiki markup codes. Simply click on what you want to use and it will appear in the edit box above.

View this template

This page is a member of 1 hidden category: