[ic] alternating colour display

Jonny Prouty interchange-users@icdevgroup.org
Sun Nov 17 12:55:01 2002


This is probably the simplest way to do what you want.

You can find it in the manual at
http://www.icdevgroup.org/i/dev/docfly.html?mv_arg=ictags03%2e02.

[PREFIX-alternate N] DIVISIBLE [else] NOT DIVISIBLE
[/else][/PREFIX-alternate]

Set up an alternation sequence. If the item-increment
is divisible by `N', 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]


Hope this helps.

Jonny

--- Cameron <ritontor@icenet.com.au> wrote:
> i'm trying to alternate colours on my item display,
> using this code:
> 
> [set colourset]no[/set]
> [loop
> search="se=ADIPEX/sf=category/tf=title,contains"]
> <FORM ACTION="[process-target]" METHOD=POST>
> <INPUT TYPE=hidden  NAME="mv_todo"       
> VALUE="refresh">
> <INPUT TYPE=hidden  NAME="mv_order_item" 
> VALUE="[loop-code]">
>                 [if colourset =~ /no/][set
> colourset]yes[/set]
>                 #print it in white....
>                 [else][set colourset]no[/set]
>                 #print it in a colour
>                 [/else][/if]
> </form>
> [/loop]
> 
> yet it never seems to do the "else" but. doing a
> [scratch colourset] jut
> after the [loop] begins shows me that it's setting
> colourset to yes, but it
> still prints it out in white. can someone tell me
> what i'm doing wrong? this
> seems to be right to me, but it's obviously not...
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
>
http://www.icdevgroup.org/mailman/listinfo/interchange-users


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com