Template:Random page in category/doc
| This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template creates a link to random page from a category.
Usage
- First parameter is the category from which to get a random page. If it is not specified, it defaults to current page, which works only on category pages.
- Parameter
|ns=is for specifying the namespace number. Separate multiple namespace numbers with;or!(e.g.|ns=2;118) - Parameter
|type=specified the type of page to return (page,subcat, orfile).|type=page,|type=subcat, and|type=fileare equivalent to|ns=0,|ns=14, and|ns=6, respectively. - Parameter
|action=specifies an action to perform on the page (e.g.|action=edit). See Parameters to index.php§Actions. - Parameter
|text=is for specifying different link text.
TemplateData
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Category | 1 | Category from which page will be selected | Page name | optional |
| Namespace | ns | no description | Unknown | optional |
| type | type | no description | Unknown | optional |
| action | action | no description | Unknown | optional |
| text | text | no description | Unknown | optional |
Examples
- Template:Tld would produce on Category:Physics: Template:Random page in category
- Template:Tld produces: Template:Random page in category
- Template:Tld produces: Template:Random page in category
- Template:Tld produces: Template:Random page in category
- Template:Tld produces: Template:Random page in category
- Template:Tld produces: Template:Random page in category
- Template:Tld produces: Template:Random page in category
See also
- Random page in category on toolserver – the tool this template is based upon