Template:Random old school/doc

From Tardis Wiki, the free Doctor Who reference
< Template:Random old school
Revision as of 23:25, 21 October 2013 by CzechOut (talk | contribs) (Created page with "'''{{tlx|{{PAGENAME}}}}''' is a randomisation template which comes from a point in the development of wikipedia:template:random number before it depended on <nowiki>{{#tim...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{Random old school/doc}} is a randomisation template which comes from a point in the development of wikipedia:template:random number before it depended on {{#time:U}}. To you, the user, it should still function much like {{random}}, so those instructions are included below.


{{random}} generates a random number, at least to the extent that non-mathematicians will be happy with the term "random", through simple markup. The number can be from 1 to whatever number you choose, up to 1000.

Syntax is straightforward:

{{random|1000}} = 328

This number will change every time the page loads.

Though this simple aspect is enough to power any number of functions — such as determining which random, numbered subpage to call on a page, the template does have additional sophistication, detailed at template:random on Wikipedia.

Example of calling forth a page

If you type the following, you will get a different quote of the week on every page load:

{{qotw/{{#expr:{{random|52}} + 1}}}}

Test it out by reloading this page several times. What you get below will be different on almost every page, though with a sample size of only 52, you're bound to get some repeats. The reason is because there are 53 pages in the following format:

{{qotw/n}}

However, there is no {{tlx|qotw/0}}. Thus by adding 1 to the randomly selected number between 0 and 52, we ensure the choice will be between the numbers 1 and 53.

Rani Chandra: It’s like something’s wrong. It feels like I’ve lost something really special, only I don’t know what it is.
Haresh Chandra: That doesn't make any sense.
Rani: I know it doesn't, and it's driving me mad. But I can't shake it. It's like nothing's right anymore. My whole life, Dad - it's like it's not me anymore.
TV: The Curse of Clyde Langer