Template:Random new
Remember, however, that the instructions below are written for {{random}} and therefore you will have to substitute {{random}} with {{random old school}}. Also, there are currently, as of 21:12, October 22, 2013 (UTC), bugs with {{random}} that prevent it from randomising properly. Therefore, you may not see the example below change on page load.
This example, however, should randomly display a number between one and 52 for you:
{{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}} = 942
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[[edit source]]
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.
- Ian Chesterton: Yes, but are you sure he’s doing everything he can? I’ve been thinking about it a lot. We don’t have any way of checking on him.
- Barbara Wright: Are you suggesting he’s deliberately keeping us here? Oh, Ian, after all we’ve been through – he’s tried and tried –
- Ian: I don’t know what I’m suggesting. I just think we should try to learn something about how the TARDIS works. Then we’ll know what to think.
- Barbara: I can’t believe that the Doctor would deceive us about something so important. Why do you think he’s so upset about leaving Susan? He could go back and see her any time he liked if the TARDIS was working properly.
- Ian: I don’t see that the Doctor’s particularly upset. He told Susan he would be back, remember. Maybe he can visit her whenever he likes. Maybe he could take us back to London, 1963, right now if he wanted to. I’d just like to know.