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!
== Text list == The <code>text_list</code> function outputs a list in a random order, text-style. In other words, it is like the <code>list</code> function, but with a different separator before the last item. {{#invoke:random|text_list|''list item 1''|''list item 2''|''list item 3''|...|sep=''separator''|conj=''conjunction''|limit=''number of items to display''|same=''yes''}} 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 [[#List|list function]]. 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. '''Examples''' <small>({{purge|refresh|anchor=Text list}})</small> * <code><nowiki>{{#invoke:random|text_list|egg|beans|sausage|bacon|spam}}</nowiki></code> → {{#invoke:random|text_list|egg|beans|sausage|bacon|spam}} * <code><nowiki>{{#invoke:random|text_list|egg|beans|sausage|bacon|spam|sep=;&#32;}}</nowiki></code> → {{#invoke:random|text_list|egg|beans|sausage|bacon|spam|sep=; }} * <code><nowiki>{{#invoke:random|text_list|egg|beans|sausage|bacon|spam|sep=;&#32;|conj=&#32;or&#32;}}</nowiki></code> → {{#invoke:random|text_list|egg|beans|sausage|bacon|spam|sep=; |conj= or }} * <code><nowiki>{{#invoke:random|text_list|egg|beans|sausage|bacon|spam|limit=3}}</nowiki></code> → {{#invoke:random|text_list|egg|beans|sausage|bacon|spam|limit=3}} * <code><nowiki>{{#invoke:random|text_list|egg|beans|sausage|bacon|spam|same=yes}}</nowiki></code> → {{#invoke:random|text_list|egg|beans|sausage|bacon|spam|same=yes}} * <code><nowiki>{{#invoke:random|text_list|egg|beans|sausage|bacon|spam|same=yes}}</nowiki></code> → {{#invoke:random|text_list|egg|beans|sausage|bacon|spam|same=yes}}
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