[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
RE: [mv] results page
****** message to minivend-users from "Cameron B. Prince" <cbp@InternetExpertsLLC.com> ******
Great snip of code there Ed.
I had wondered about doing this as well...
Cameron
-----Original Message-----
From: owner-minivend-users@minivend.com
[mailto:owner-minivend-users@minivend.com]On Behalf Of Ed LaFrance
Sent: Sunday, June 11, 2000 12:33 PM
To: minivend-users@minivend.com
Subject: Re: [mv] results page
****** message to minivend-users from Ed LaFrance <edl@newmediaems.com>
******
Andreas -
This code will do it for a two-column format, it will also close the table
row properly if you have an odd number of results. In the application it
was designed for it would sometimes skip results, so I used the scratch
variable colcount to keep track of where I was in the item list, along with
some condition logic which I have deleted here. You could probably remove
the 2nd and third line and just use [item-increment] wherever you see
[scratch colcount] thereafter.
- Ed L.
----------------->
<table width=100% border=0 cellpadding=4 cellspacing=0 bgcolor=#ffffff>
<tr><td colspan=4 class=tiny>
<!-- the two columns are actually four - two pairs of two columns each,
the second one can easily be removed, make colspan=2 above, then see
below -->
</td></tr>
[search-list]
[set colcount][/set]
[set name=colcount interpolate=1][calc][scratch colcount] + 1[/calc][/set]
[perl interpolate=1]
$a = [scratch colcount] % 2;
if ($a){"<tr>"}else{""};
[/perl]
<td> <font color=black style="font-size:
12pt"><b>[item-code]</b></font><br>
<font color=black>[item-description]</font>
</td>
<td><!-- you can take out this TD pair unless you want to use it -->
another column
</td>
[perl interpolate=1]
$a = [scratch colcount] % 2;
if (!$a){"</tr>"}else{""};
[/perl]
[if type=value term=mv_search_match_count op="=="
compare="[item-increment]"]
[perl interpolate=1]
$a = [scratch colcount] % 2;
# take "colspan=2" out of the td tag below if you removed
the 2nd column above
if ($a){"<td colspan=2> </td></tr>"}else{""};
[/perl]
[/if]
[/search-list]
</table>
At 06:22 PM 6/11/00 +0200, you wrote:
>****** message to minivend-users from Andreas Kotowicz
><koto@mynetix.de> ******
>
>hi,
>
>I have a problem generating a results page. usually you take some <tr> tags
>into a loop and then everything will be automatically generated like this:
>
>item1
>item2
>..
>itemX
>
>but now I thougt about results being displayed like that:
>
>item1 item2
>item3 item4
>...
>itemX-1 itemX
>
>
>I really don't know how to generate the code. you need one loop for
creating
>new fields, and an other one the items. but how? anyone a hint?
>
>
>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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| New Media E.M.S. Software Solutions for Business |
| 12831 Blanco Ct. Consulting |
| Poway, CA 92064 U.S.A. Custom Programming |
| 858-486-6508 Internet and eCommerce |
| 630-604-4265 eFax |
| edl@newmediaems.com |
| http://www.newmediaems.com |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
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