Template:Random/doc: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
(Created page with "'''{{tl|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...")
 
No edit summary
Line 4: Line 4:


{{tlx|random|1000}} = {{random|1000}}
{{tlx|random|1000}} = {{random|1000}}
This number will change every time the page loads.  If, however, you want to choose a random number that's "locked" in place by the act of hitting the publish button, then you have to substitute the template, like this:
<code><nowiki>{{subst:{{random|1000}}}}</nowiki></code> = {{subst:{{random|1000}}}}

Revision as of 19:01, 23 April 2012

{{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}} = 80

This number will change every time the page loads. If, however, you want to choose a random number that's "locked" in place by the act of hitting the publish button, then you have to substitute the template, like this: {{subst:{{random|1000}}}} = {{subst:80}}