Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] results page



******    message to minivend-users from Charles Kirby <kirbych@monmouth.com>     ******

One more method.  Even simpler (?).
<!-- start my big table -->
<table>
[set leftright]1[/set]
[loop random=4
        search= |
                sf=special
                se=yes
                ml=4
                        |
]
[if scratch leftright == 1]
               <tr>
[/if]

<make pretty (small) table; display item>

[if scratch leftright == 0]
               </tr>
[set leftright]1[/set]
[else]
[set leftright]0[/set]
[/else]
[/if]
[/loop]

</table>
<!-- end of my big table -->

So, all it's doing is searching for a maximum of 4 results 
(if you want three rows, then set random=6)
and displaying one table for each result (in a TD table cell).
Now, as long as it's a left-hand table, there's no need for a </tr>,
since the next <td><table><tr><td>....result</td></tr></table></td> will
be the right-hand table.
In the event that the last table presented is the only one for the row,
we will need a single </tr> to finish that row, so you have to test for
that.

Works for me:-)

 _____                         .     .
 '    \\                  .                .                      |>>
     O//             .                        .                   |
    \_\          .        Charles Kirby         .                 |
    | |      .    Monmouth Internet Corporation  .    .  .        |
   /  |  .                                        . .      .      |
  /  .|               kirbych@monmouth.com                  ...o  |


On Mon, 12 Jun 2000, Andreas Kotowicz wrote:

> ******    message to minivend-users from Andreas Kotowicz <koto@mynetix.de>     ******
> 
> ok, here's joachims code in a simple page:
> 
> 
> <html>
> <body>
> [seti flag]0[/seti] 
> [seti end]0[/seti]
> [search-region]
> 
> <TABLE>
> 
> [search-list]
> 
> [perl arg=scratch]
> my $out = "";
> if($Safe{'scratch'}->{'flag'} == 0) {
>    $Safe{'scratch'}->{'flag'} = 1;
>    $out = "<TR>";
>   }
> [/perl]
> <TD><A HREF="[area [item-field artnr]]">[item-field artbez]</A></TD>
> 
> [perl arg=scratch]
> my $out = "";
> if($Safe{'scratch'}->{'flag'} == 0) {
>    $Safe{'scratch'}->{'flag'} = 2;
>    $Safe{'scratch'}->{'end'} = 1;
>   } 
>   else {
>    $Safe{'scratch'}->{'flag'} = 0;
>    $Safe{'scratch'}->{'end'} = 0;
>    $out = "</TR>";
>   }
> [/perl]
> 
> [if scratch end == 1]
> </TR>
> [/if]
> [/search-list]
> </TABLE>
> 
> [/search-region]
> 
> </body>
> </html>
> 
> 
> this code is being generated:
> 
> <html>
> <body>
> <TABLE>
> 
> <TR>
> <TD><A 
> HREF="http://192.168.100.20/cgi-bin/hundertmark/36.152.html";>Stretch-Shirt 
> Fire Dragon</A></TD>
> </TR>
> 
> <TR>
> <TD><A 
> HREF="http://192.168.100.20/cgi-bin/hundertmark/40.159.html";>Kapuzensweatshirt</A></TD>
> </TR>
> 
> .....
> 
> </TABLE>
> </body>
> </html>
> 
> so the results look like:
> 
> item1
> item2
> item3
> item4
> ....
> 
> i'm still looking forward for:
> 
> item1	item2
> item3	item4
> ...	...
> 
> 
> andreas
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
> 


-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: