This page will only parse completely when it is included in another page.

[top]Usage

This template transcludes a numbered subpage that is randomly selected between the "start"-numbered subpage and the "end"-numbered subpage as follows:
class="bbcode_container" |
Code:
[noparse]{{<page name>/<randomly selected number between "start" and "end">}}[/noparse]
It may be used with or without parameters as follows:
class="bbcode_container" |
Code:
{{Random subpage}}
or
{{Random subpage|page=<page name>|start=<number>|end=<number>|seed=<number>}}
or
{{Random subpage|<page name>|<number>|<number>|<number>}}
=== Parameters ===
  • 1|page: The name of the page to be displayed (without the subpage number). The default is empty.
  • 2|start: The starting sub-subpage number. Must be a positive integer. The default is 1.
  • 3|end: The ending sub-subpage number. Must be a positive integer. The default is 2.
  • 4|seed: (optional) The default seed is 2 and can be set to any other integer value (used to generate distinct values on the same page). Prime numbers work best, such as 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, and 113.

[top]Application example

This template can be used to display a list of randomly selected items from a group of numbered subpages. For example, portals that use "Did you know..." sections can randomly display four items from a page named "Portal:Foo/Did you know" that has sixteen numbered subpages as follows:
class="bbcode_container" |
Code:
{{Random subpage|page=Portal:Foo/Did you know|start=1|end=4|seed=2}}
{{Random subpage|page=Portal:Foo/Did you know|start=5|end=8|seed=3}}
{{Random subpage|page=Portal:Foo/Did you know|start=9|end=12|seed=5}}
{{Random subpage|page=Portal:Foo/Did you know|start=13|end=16|seed=7}}
it:Template:Random subpage

Tags for this Page

Similar Pages

  1. Documentation subpage
    By Arjan in forum Template
    Comments: 0
    Last Post: 11-23-2008, 08:30 PM
  2. Documentation subpage/doc
    By Arjan in forum Template
    Comments: 0
    Last Post: 11-23-2008, 08:30 PM

Bookmarks

Posting Permissions

Posting Permissions
  • You may not create new articles
  • You may not edit articles
  • You may not protect articles
  • You may not post comments
  • You may not post attachments
  • You may not edit your comments
BIRTHRIGHT, DUNGEONS & DRAGONS, D&D, the BIRTHRIGHT logo, and the D&D logo are trademarks owned by Wizards of the Coast, Inc., a subsidiary of Hasbro, Inc., and are used by permission. ©2002-2010 Wizards of the Coast, Inc.