S55 Generate a Random Number
Use the S55 Tag to generate a random number, an integer between a specified minimum and maximum.
Application
Platform
Can You Add This S-Tag in the Luminate OnlineContent Editor?
No, add the S-Tag code to the HTML using the Plain Text Editor.
Can You Add This S-Tag in the Luminate CMSContent Editor?
No, add the S-Tag code to the HTML using the Plain Text Editor.
Format
- Standard
[[S55:max]]
[[S55:min,max]]
[
[S55:min,max,mindigits]
] - XML
<convio:session name="55" param=" min,max,mindigits" />
Parameters
- min - The minimum number. Default is 1. Must be between 0 and max, inclusive.
- max - The maximum number. Default is 1. Must be between min and 100000000, inclusive. max defaults to 9 if the parameter parse fails.
- mindigits - The minimum number of digits for padded output formatting. Default is 1. Must be between 1 and 10, inclusive. For example, if mindigits is 3 and the random number is 4, then the output would be "004".
Sample Code
- Standard
Display a random image from among a group of JPG files named randomPic1.jpg through randomPic9.jpg.<img src="../images/randomPic[[S55:1,9,1]].jpg" />
- XML
<convio:session name="55" param="1,9,1"></convio:session>