Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 21:38, 20 April 2026 by Khalid (talk | contribs) (Created page with "<noinclude>__NOTOC__ {{Lua|Random}} This template randomly selects one option from the given list each time the page loads. Due to caching of page data, the random selection may not change on ''every'' refresh. == Syntax == <code><nowiki>{{Random|Option1|Option2|Option3|...}}</nowiki></code> == Example == <code><nowiki>{{Random|Apples|Bananas|Cherries|Grapes}}</nowiki></code> This randomly displays either "Apples", "Bananas", "Cherries", or "Gra...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template randomly selects one option from the given list each time the page loads.

Due to caching of page data, the random selection may not change on every refresh.

Syntax

{{Random|Option1|Option2|Option3|...}}

Example

{{Random|Apples|Bananas|Cherries|Grapes}}

This randomly displays either "Apples", "Bananas", "Cherries", or "Grapes" on each page load. For instance, this time it chose:

Lua error in package.lua at line 80: module 'Module:List' not found.

Notes

  • You can add as many options as you want.
  • Each option is equally likely to be chosen.
  • Works on any page, including templates.
  • Previewing a page multiple times will bypass normal caching behavior and choose randomly each time.

This template is used to provide random quotations for many article message boxes.