[ic] loop-last question

Paul Jordan paul at gishnetwork.com
Mon Oct 13 16:35:12 EDT 2003


Grant <listbox at email.com> wrote:
>> Thanks Chris.  I didn't know what loop-increment was.  Time to
>> get rid of my
>> counters.  Thanks to your help I've got loop-last doing what I need.
>> But I'm wondering if there's a way to use it without calc.  Here's
>> an example that works with calc:
>>
>> [loop search="ml=10000/ra=yes"]
>> code: [loop-code]<br />
>> 	[loop-last][calc] return '[loop-code]' eq 'sku-20';
>> [/calc][/loop-last] [/loop]
>>
>> How could it be written without calc?
>>
>> - Grant
>
> Can loop-last be used without calc?  I'm asking because I'm under the
> impression that calling calc or perl results in a performance hit.
>
> - Grant
>

http://www.icdevgroup.org/i/dev/docfly.html?mv_arg=ictemplates05%2e04


[loop-last]tags[/loop-last]

Evaluates the output of the ITL tags encased in the [loop-last] tags. If it
evaluates to a numerical non-zero number (for example, 1, 23, or -1), the loop
iteration will terminate. If the evaluated number is negative, the item itself
will be skipped. If the evaluated number is positive, the item itself will be
shown, but will be last on the list.


Paul



More information about the interchange-users mailing list