PREFIX-alternate
Summary
- [PREFIX-alternate N] DIVISIBLE [else] NOT DIVISIBLE [/else][/PREFIX-alternate]
Description
Set up an alternation sequence.
If the [PREFIX-increment] is divisible by "N" then
the text will be displayed.
If an "[else]NOT DIVISIBLE TEXT[/else]" is present
then the NOT DIVISIBLE TEXT will be displayed.
For example:
- [item-alternate 2]EVEN[else]ODD[/else][/item-alternate]
- [item-alternate 3]BY 3[else]NOT by 3[/else][/item-alternate]
|
There are some additional primitives:
| Tag
|
Description
|
| [PREFIX-alternate first_only]
|
Only true on first item
|
| [PREFIX-alternate last_only]
|
Only true on last item
|
| [PREFIX-alternate except_last]
|
True except on last item
|
| [PREFIX-alternate except_first]
|
True except on first item
|
| [PREFIX-alternate 0]
|
Same as "first_only"
|
| [PREFIX-alternate -1]
|
Same as "except_last"
|
In the common case where you want to separate by a comma or other joiner,
you can use the following example:
You have the following items in your basket:
[item-list]
[item-code][item-alternate except_last], [/item-alternate]
[/item-list]
|