Editing
Module:Random/doc
(section)
From Thetacola Wiki
Jump to navigation
Jump to 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.
Anti-spam check. Do
not
fill this in!
== 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 <small>({{purge|refresh|anchor=HTML lists}})</small> |- | <code>bulleted_list</code> | Bulleted lists | <code><nowiki>{{#invoke:random|bulleted_list|egg|sausage|spam}}</nowiki></code> | {{#invoke:random|bulleted_list|egg|sausage|spam}} |- | <code>unbulleted_list</code> | Unbulleted lists | <code><nowiki>{{#invoke:random|unbulleted_list|egg|sausage|spam}}</nowiki></code> | {{#invoke:random|unbulleted_list|egg|sausage|spam}} |- | <code>horizontal_list</code> | Horizontal bulleted lists | <code><nowiki>{{#invoke:random|horizontal_list|egg|sausage|spam}}</nowiki></code> | {{#invoke:random|horizontal_list|egg|sausage|spam}} |- | <code>ordered_list</code> | Ordered lists (numbered lists and alphabetical lists) | <code><nowiki>{{#invoke:random|ordered_list|egg|sausage|spam}}</nowiki></code> | {{#invoke:random|ordered_list|egg|sausage|spam}} |- | <code>horizontal_ordered_list</code> | Horizontal ordered lists | <code><nowiki>{{#invoke:random|horizontal_ordered_list|egg|sausage|spam}}</nowiki></code> | {{#invoke:random|horizontal_ordered_list|egg|sausage|spam}} |} ; Basic usage {{#invoke:random|''function''|''list item 1''|''list item 2''|''list item 3''|...|limit=''number of items to display''|same=''yes''}} ; All parameters {{pre| <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>|type = </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> }} The maximum number of list items to display can be set with the {{para|limit}} parameter. The lowest possible is 0 and the highest possible is the length of the list. If the {{para|same}} parameter is set to "yes", "y", "true", or "1", the list order is the same for each module call on a given page. Please see [[Module:List]] for a full explanation of the other parameters.
Summary:
Please note that all contributions to Thetacola Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, 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 (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Module
Discussion
Read
Edit source
History
Page actions
Module
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information