[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Result Page
What I don't understand is how does the [loop] tag interact with
[search-list]. Doesn't a [loop-increment] happen within [search-list]?
--Brian
On Tue, 19 Oct 1999 11:59:33 -0700
Ryan Hertz <rhertz@gyb.baits.com> wrote:
> ****** message to minivend-users from Ryan Hertz <rhertz@gyb.baits.com> ******
>
> At 11:15 AM 10/19/1999 , you wrote:
> >****** message to minivend-users from ".cory.trese."
> <digital@specialty-books.com> ******
> >
> >On Tue, 19 Oct 1999, you wrote:
> >
> >>I'm attaching a copy of my results page. The problem being, how would I
> >>drop your code in to print the results horizontally?
> >
> >the only way I can think to do this is to create a table, and then use the
> >results loop ("[search-list]") to create as set of cells going horizontally
> >across the page.
> >
> >The logic I use above has a serious flaw, though. If you return more than
> 4 or
> >5 results, you'll have an ugly page that ppl have to scroll over to see.
> >Customers aren't usually smart (at least mine aren't ;) enough to use
> scrolling.
> >
> >My solution to this is to increase (or set) a value after X number of
> >horizontal cells, and then put in a new data row ("<TR>")
>
> Just thought I'd chime in and contribute some code for that:
>
> <TABLE BORDER=2 CELLSPACING=3 CELLPADDING=3 COLS=10>
> <TR>
> [loop arg=[item-field color]]
> <TD align=center>
> <A HREF="[area [loop-code]]"><IMG SRC="/order/images/chart/[loop-code].jpg"
> WIDTH="40" HEIGHT="46" BORDER="0" LOWSRC="/0.gif" ALT="[loop-field
> description]"></A><BR>[loop-code]</TD>
> [calc] return '</TR><TR>' if '[loop-increment]' % 10 eq 0[/calc]
> [set colorcount][loop-increment][/set]
> [/loop]
> </TR><CAPTION><B>[scratch colorcount] Available Colors:</B></CAPTION>
> </TABLE>
>
> The [calc] line is the magic one. Mine is set for 10 columns. Don't know
> how effecient my counting code is, but it works - and it solved the eternal
> question of 'how many darn colors you got?'
_________________________________________________________________________
Brian Wright Aturna Communications Inc.
bdw@aturna.com Internet Services
WWW http://www.aturna.net
_________________________________________________________________________