[ic] LOOP listing problems in new IC version
Mike Heins
interchange-users@icdevgroup.org
Tue Apr 15 08:56:01 2003
Quoting Kent-Rune K.S?trum (kent@datamarked.no):
> Hi to list members,
>
> I tried to solve this reading FAQ's and checking sites for info, but I
> cant find a solution to my problem, so I hope this list might help me
> with a tip how to solve it.
>
> I have used InterChange/MiniVend for 3 years, so I am quite familiar
> with the system. Yesterday my ISP upgraded to last version of
> InterChange, and then I got some problems with following [LOOP] function
> code that is listing products from my database using a list priority
> (just numbers from 1 to 9 where 1 is listed first and 9 is listed at
> bottom inside my [LOOP] command).
>
> ---cut----
>
> [loop search="ra=yes/cs=no/tf=listpriority/to=f"]
> [loop-next]
> [calc]'[loop-field frontpage]' eq 'No'[/calc]
> [/loop-next]
>
> .... HTML code here grabbing info from database ... works fine
>
> [/loop]
>
> ---cut----
>
> This is a module that is called in the frontpage (firstpage). In the
> database I set YES/NO if it should be on the frontpage, and LISTPRIORITY
> I chose integers 1-9, where 1 is listed first.
>
> My goal is that I got full control what products are listed first. From
> business point of view this is very important.
>
> Problem is: Some products just get left out - and I cant find a pattern
> why. I got 5 products Yes on frontpage, but only 3 shows up etc. Used to
> work in previous InterChange version.
>
> Are there some changes in the [LOOP] commands and parameters I must
> include to get the sort listing correct again? I would be very happy for
> a tip how to solve this.
Might have to do with st=db or st=text in the wrong state by default.
It would be much easier (and much faster) just to do:
[loop search="
co=yes
sf=frontpage
se=No
op=ne
tf=listpriority
to=f
"]
No [loop-next] required, and this should speed the page up immensely
if you have any number of items returned.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
"Laughter is inner jogging." -- Norman Cousins