[ic] loop-code

Kevin Walsh interchange-users@interchange.redhat.com
Tue Aug 14 15:14:00 2001


> > Hi, I am trying to do a loop like this:
> >
> > [loop arg="1 2 3"]
> >    [item-param ‘modname[loop-code]’]
> > [/loop]
> >
> > This loop will return on the page:
> >
> > [item-param ‘modname1’]
> > [item-param ‘modname2’]
> > [item-param ‘modname3’]
> >
> > but obviously I’m trying to get the value for each of those, not that
> > string. Anyone have any ideas??
> >
> change item-param to loop-param ?
> Ven
>
Tim, mixing [item-*] with [loop-*] doesn't work, as you have found.
Fortunately, as ever, there's more than one way to do it.

For instance, you could try this:

    [loop arg="1 2 3"]
        [data table="products" col="modname[loop-code]" key="[item-code]"]
    [/loop]

I'll assume your opening and closing quote mismatch was generated by a
"helpful" email client.  :-)

--
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.uk.com
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/