User:Kevincox/Random

From Team Fortress Wiki
< User:Kevincox
Revision as of 17:48, 28 November 2012 by Darkid (talk | contribs) (Although I don't understand why you've added 2... you can just use parenthesis.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Documentation for Kevincox/Random


This template will select a random item from the list of items passed in and "return" it. Effectively including one of the passed in items at random.

Syntax

 {{User:Kevincox/Random|3
 |{{Quotation|'''The Medic''', making preparations|... Let's go practice medicine.|sound=LetsGoPracticeMedicine.wav}}
 |{{Quotation|'''Kevin Cox''', writing a template|Please work!}}
 |{{Quotation|'''Kevin Cox''', running out of things to say.|Ummm...}}
 }}
 

The first argument is the number of items and the rest of the arguments are the items themselves. Below is the above example.


... Let's go practice medicine.
The Medic, making preparations



Updating Notes

Because Mediawiki caches pages to improve performance the template will only update when the page is purged, this happens when a page, or any templates on a page are edited. The cache is also invalidated and purged every $wgParserCacheExpireTime seconds (the default is 24h) see this page for more info.