Jump to content

Template:Random page in category/doc: Difference between revisions

From Noumenapedia
m Undid edits by 69.173.211.26 (talk) to last revision by Paine Ellsworth
 
m 1 revision imported
 
(No difference)

Latest revision as of 17:02, 9 September 2026

__EXPECTED_UNCONNECTED_PAGE__

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 <syntaxhighlight lang="wikitext" inline style="display: none;" />|ns= is for specifying the namespace number. Separate multiple namespace numbers with ; or ! (e.g. <syntaxhighlight lang="wikitext" inline style="display: none;" />|ns=2;118)
  • Parameter <syntaxhighlight lang="wikitext" inline style="display: none;" />|type= specified the type of page to return (page, subcat, or file). <syntaxhighlight lang="wikitext" inline style="display: none;" />|type=page, <syntaxhighlight lang="wikitext" inline style="display: none;" />|type=subcat, and <syntaxhighlight lang="wikitext" inline style="display: none;" />|type=file are equivalent to <syntaxhighlight lang="wikitext" inline style="display: none;" />|ns=0, <syntaxhighlight lang="wikitext" inline style="display: none;" />|ns=14, and <syntaxhighlight lang="wikitext" inline style="display: none;" />|ns=6, respectively.
  • Parameter <syntaxhighlight lang="wikitext" inline style="display: none;" />|action= specifies an action to perform on the page (e.g. <syntaxhighlight lang="wikitext" inline style="display: none;" />|action=edit). See Parameters to index.php§Actions.
  • Parameter <syntaxhighlight lang="wikitext" inline style="display: none;" />|text= is for specifying different link text.

TemplateData

<templatedata> { "params": { "1": { "label": "Category", "description": "Category from which page will be selected", "type": "wiki-page-name" }, "ns": { "label": "Namespace" }, "type": {}, "action": {}, "text": {} } } </templatedata>

Examples

See also