For more information... RTFM!
NAVIGATION
RECENTLY VIEWED
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

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:

  1. [item-alternate 2]EVEN[else]ODD[/else][/item-alternate]
  2. [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]

Category:  Looping tags and sub-tags
Last modified by: Kevin Walsh
Modification date: Wednesday 7 June 2006 at 8:36 AM (EDT)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us