The choose function parses pipe-separated values from values and returns one at random.
choose(values)
The following table describes the argument for the expression function.
Table A–5 choose Argument
Argument |
Description |
---|---|
values |
The list of values to choose from, separated by the pipe character (|) |
The following obj.conf code demonstrates the use of choose to randomly select one of three images:
NameTrans fn="rewrite" from="/images/random" path="/images/$(choose('iwsvi.jpg|0061.jpg|webservervii.jpg'))"