Tags Order A-Z Category Context

<sn:random>

Renders a random option from any of its <snRandomOption> child tags. You can determine how many items are renderred by setting the pick attribute. Also, if unique is set, once an item is picked it cannot be picked again. An error will be raised if unique is true and picks is greater than the number of child elements.

Attributes

  • boolean < optional > If true once an item is selected, it will not be shown again. Must be a boolean . Default is true.
  • integer < optional > Determines how many items should be returned. Must be an int . Default is 1.

Valid Contexts

  • : The area where your app is displayed alone
  • : The Bebo profile page
  • : On a notification page (after the user has clicked on a link in the email)
  • : On the invitations page

Code

<sn:random pick="4">
   <sn:random-option>1</sn:random-option>
   <sn:random-option>2</sn:random-option>
   <sn:random-option>3</sn:random-option>
   <sn:random-option>4</sn:random-option>
 </sn:random>
Play with this code in the sandbox
1243