MediaPost Social Network

Up:random-option

Contains code to be output when selected by the up:random tag.

Description

up:random-option contains code to be output if that tag is selected by the up:random option. The frequency of this pick can be controlled by the weight attribute.

Attributes

  • Optional
    • float weight - allows control of frequency of choice. (default value is 1.0)

Notes

  • Weights of options are relative to the number of options left, which shrinks if unique==true and pick>1 in the parent up:random tag.
  • Weights of options can be any float > 0. The weights are relative to each other, not necessarily to 1.

Requirements

Sample Code

  <up:random>
      <up:random-option weight="2">A: This will be shown 2 times as often as B.</up:random-option>
      <up:random-option weight="1">B: This will be show half as often as A.</up:random-option>
   </up:random>