Content deleted Content added
m →Number: fix missing space |
add html list docs and update the function names |
||
Line 32:
* <code><nowiki>{{#invoke:random|item|egg|beans|sausage|bacon|spam}}</nowiki></code> → {{#invoke:random|item|egg|beans|sausage|bacon|spam}}
==
The <code>
{{#invoke:random|item|''list item 1''|''list item 2''|''list item 3''|...|sep=''separator''}}
Line 64:
'''Examples''' <small>({{purge|refresh}})</small>
* <code><nowiki>{{#invoke:random|
* <code><nowiki>{{#invoke:random|
* <code><nowiki>{{#invoke:random|
* <code><nowiki>{{#invoke:random|
* <code><nowiki>{{#invoke:random|
==
The <code>
{{#invoke:random|item|''list item 1''|''list item 2''|''list item 3''|...|sep=''separator''|conj=''conjunction''}}
The separator can be specified with either the {{para|sep}} or {{para|separator}} parameters; its default value is "{{int:comma-separator}}". The conjunction can be specified with either the {{para|conj}} or {{para|conjunction}} parameters; its default value is " and ". The separator and the conjunction can be specified with the same values as the separator in the [[#
* <code><nowiki>{{#invoke:random|
* <code><nowiki>{{#invoke:random|
* <code><nowiki>{{#invoke:random|
== HTML lists ==
If you wish to output an HTML list in a random order, you can choose between five different functions: <code>bulleted_list</code>, <code>unbulleted_list</code>, <code>horizontal_list</code>, <code>ordered_list</code>, and <code>horizontal_ordered_list</code>. These functions all use [[Module:List]].
{| class="wikitable"
|-
! Function name
! Produces
! Example code
! Example output
|-
| <code>bulleted_list</code>
| Bulleted lists
| <code><nowiki>{{#invoke:random|bulleted_list|First item|Second item|Third item}}</nowiki></code>
| {{#invoke:random|bulleted_list|First item|Second item|Third item}}
|-
| <code>unbulleted_list</code>
| Unbulleted lists
| <code><nowiki>{{#invoke:random|unbulleted_list|First item|Second item|Third item}}</nowiki></code>
| {{#invoke:random|unbulleted_list|First item|Second item|Third item}}
|-
| <code>horizontal_list</code>
| Horizontal bulleted lists
| <code><nowiki>{{#invoke:random|horizontal_list|First item|Second item|Third item}}</nowiki></code>
| {{#invoke:random|horizontal_list|First item|Second item|Third item}}
|-
| <code>ordered_list</code>
| Ordered lists (numbered lists and alphabetical lists)
| <code><nowiki>{{#invoke:random|ordered_list|First item|Second item|Third item}}</nowiki></code>
| {{#invoke:random|ordered_list|First item|Second item|Third item}}
|-
| <code>horizontal_ordered_list</code>
| Horizontal ordered lists
| <code><nowiki>{{#invoke:random|horizontal_ordered_list|First item|Second item|Third item}}</nowiki></code>
| {{#invoke:random|horizontal_ordered_list|First item|Second item|Third item}}
|}
; Basic usage
{{#invoke:random|''function''|''list item 1''|''list item 2''|''list item 3''|...}}
; All parameters
{{pre2|
<nowiki>{{</nowiki>#invoke:random<nowiki>|</nowiki>''function''
<nowiki>|</nowiki>''first item''<nowiki>|</nowiki>''second item''<nowiki>|</nowiki>''third item''<nowiki>|</nowiki>...
<nowiki>|start = </nowiki>''start number for ordered lists''
<nowiki>|marker = </nowiki>''type of marker for ordered lists''
<nowiki>|list_style_type = </nowiki>''type of marker for ordered lists (uses CSS)''
<nowiki>|class = </nowiki>''class''
<nowiki>|style = </nowiki>''style''
<nowiki>|list_style = </nowiki>''style for the list''
<nowiki>|item_style = </nowiki>''style for all list items''
<nowiki>|item_style1 = </nowiki>''style for the first list item''<nowiki> |item_style2 = </nowiki>''style for the second list item''<nowiki> |</nowiki>...
<nowiki>|indent = </nowiki>''indent for horizontal lists''
<nowiki>}}</nowiki>
}}
Please see [[Module:List]] for a full explanation of the parameters.
|