Random Number



3rd Party (Commercial)

EE Version Support

  • ExpressionEngine 1.x
  • ExpressionEngine 2


If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher


  • jQuery for the Control Panel

Add-On Type(s)



Random Number allows you to output random numbers.


1) min - Optional. Allows you to specify the lowest number to return.
Default value is “1”.

2) max - Optional. Allows you to specify the highest number to return.
Default value is “50”.

3) invalid_input - Optional. Accepts two values: “alert” and “silence”.
Default value is “silence”. If the value is “alert”, then in cases when
the plugin has some problem with parameters,  PHP alert is being shown;
if the value is “silence”, then in cases when the plugin has
some problem with parameters, it finishes its work without any alert being shown.
Set this parameter to “alert” for development, and to “silence” - for deployment.


The plugin supports one hundred variables of the type outlined below:

{random_number_0}, {random_number_1}, {random_number_2}, {random_number_3}, ...
{random_number_10}, {random_number_11}, {random_number_13}, ..., {random_number_99}

The numbers at the end of variables are used only to differentiate
variables from each other.

Conditionals are supported.


{exp:random_number min="1" max="10"}

{if random_number_0 > 5}

Some code


Some code



A more complicated example - Random Number plugin together with Child Categories and Category Info plugins used to output three random categories:

{exp:cat_info category_id="179" parse="inward"}
{exp:random_number min="1" max="{cat_info_nonempty_subcategories_number}" parse="inward"}
{exp:child_categories parent="179" child_categories_sort_by="name" child_categories_sort_direction="asc" show_empty="no" entries_sort_by="date" entries_sort_direction="asc" entries_limit="10" site="1" parse="inward"}

{if "{random_number_0}" == "{child_category_count}" OR "{random_number_1}" == "{child_category_count}" OR "{random_number_2}" == "{child_category_count}"}

<a href="{child_category_url_title}">{child_category_name}</a>, number of entries: {entries_total}



Random Number Links

This entry was created July 13, 2009, 1:11 pm.
This entry was last updated August 28, 2011, 5:43 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!