Random Dynamic Content

In this article we're going to explain how to use Random Dynamic Content.

  1. Integer
  2. Float
  3. Color

You'll never know what will happen next with this set of Dynamic Content :) Ranging from numbers to colors, Random Dynamic Content can give you a fun way to spice up your site.

Something to note is that when these are used in conjuction with Parameters, these pieces of Dynamic Content will return something random every time that Parameter is used. To prevent this, check out this section on renderInFrame for Dynamic Content to only render once.

Integer

Differing from floats or regular numbers, Random Integer will give you a random number with no decimals. For example, a Random Integer between 10 and 20:

{{dc:random:integer min="10" max="20"}}

Random Integer Dynamic Content

Float

Float or number will give you a number with a decimal place. For example, a Random Float between 10 and 20 could be 10.1 or even 20.

{{dc:random:float min="10" max="20"}} {{dc:random:number min="10" max="20"}}

Color

Random Color will give you an RGB or RGBA color based on the parameters rMin, rMax, gMin, gMax, bMin, bMax, opacityMin, and opacityMax. Each RGB value min and max will control how light or dark the color can be. Opacity min and max will control how visible the color is.

See something inaccurate? Let us know