[ic] count results when all results are on the page - scratch var inside an item-alternate

Kyle Cook interchange-users@interchange.redhat.com
Mon May 6 14:38:00 2002


At 11:17 AM 5/6/02, you wrote:
>Thank you Ed and Kevin,
>
>That was what I needed for part of this.  Now I have this working:
>[seti matches_count][value mv_search_match_count][/seti]
>[perl]$Scratch->{half_matches} = $Scratch->{matches_count} / 2;[/perl]
>
>I get a scratch variable half_matches out with a number equal to 1/2 of the
>total number of products.  I want to use this inside the [item-alternate]
>tag like this:
>
>[item-alternate [scratch half_matches]]
>
>This, however, does not interpolate.
>
>Is there a way to get this to interpolate?
>
>Thank you,
>
>Russell Mann

Maybe the following would work for you:

[if term="[PREFIX-increment]" op="==" compare="[scratch half_matches]"]
do something here.
[/if]


PS [scratch half_matches] might not be an integer in the above perl !

Kyle