Template:randommainpage
From Homestar Runner Wiki
(Difference between revisions)
It's dot com (Talk | contribs) m (pronoun problem) |
(let's add this) |
||
Line 1: | Line 1: | ||
- | <includeonly>{{#setvar: Total_Main_Pages | {{#expr: | + | <includeonly>[[HR:{{#setvar: Total_Main_Pages | {{#expr: |
24 <!-- number of regular main pages --> + {{#setvar: Special_Main_Pages | | 24 <!-- number of regular main pages --> + {{#setvar: Special_Main_Pages | | ||
Line 11: | Line 11: | ||
| 3 = mainking | | 3 = mainking | ||
- | | <!-- default --> main{{#expr: {{#var:Get_Main_Page}} - {{#var:Special_Main_Pages}} }} | + | | <!-- default --> main{{#expr: {{#var:Get_Main_Page}} - {{#var:Special_Main_Pages}}.html }} |
}}</includeonly><noinclude>Returns the filename of a random main page, including the special main pages. | }}</includeonly><noinclude>Returns the filename of a random main page, including the special main pages. | ||
Revision as of 23:51, 18 December 2007
Returns the filename of a random main page, including the special main pages.
The same value is returned for every instance of the template on a given page (the template only chooses a random number once per page).
Usage
{{randommainpage}}
: main25[[HR:{{randommainpage}}.html]]
: HR:main25.html
To update
- Increment the number of regular main pages whenever a new one is added.
- To add a special main page, increment the appropriate number and add the filename to the lower list.