Template:Random page in category
From LIMSWiki
Revision as of 23:48, 26 January 2018 by Shawndouglas (talk | contribs) (Protected "Template:Random page in category" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) [cascading])
[edit] [ ] Template documentation
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 well only on category pages.
- Second parameter is depth of subcategories to choose from. Maximum depth is 10. If not specified, only selected category is considered.
- Parameter
text
is for specifying different link text. - Parameter
ns
is for specifying namespace id.
Examples
{{Random page in category}}
would produce on Category:Physics: Random page in this category{{Random page in category||2}}
would produce on Category:Physics: Random page in this category{{Random page in category|Physics}}
produces: Random page in category Physics{{Random page in category|Physics|2}}
produces: Random page in category Physics{{Random page in category|Physics|text=Random page}}
produces: Random page
{{Random page in category|1990s albums|2}}
produces: Random page in category 1990s albums{{Random page in category|Universities and colleges|2}}
produces: Random page in category Universities and colleges
{{Random page in category|One Laptop per Child|2}}
produces: Random page in category One Laptop per Child
The above documentation is transcluded from Template:Random page in category/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |