i4w_select
This shortcode returns a value from a list, based on a switch variable, similar to a “switch…case…” programming construct.
[ELSE_select] conditional branching is NOT supported.
Shortcode nesting is NOT supported.
Parameters
Section titled “Parameters”| Parameter | Description | Default | Required |
|---|---|---|---|
| case | A list of values, separated by ’|’ (pipe). The first item in the list is the switch value to be compared against the remaining values. | None | Yes |
Example
Section titled “Example”[i4w_select case='2|yes|no|maybe']Returns ‘no’ (the 2nd value after the switch).
[i4w_select case='maybe|yes|no|maybe']Returns ‘3’ (the ordinal position of the matching value).