
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
RE: [ic] Results.html and tables?
Quoting Paul Jordan
> OK, my problem. My partners think my results.html page is not utilizing
> space well. As you know it loops through a search and displays them one
> below the other. I agree with them though. Is there a way to display the
> results like maybe 2 or 3 across and 2 or 3 down. You know?
>
> Like lets say I am selling pictures and I would like to display results
> going 3 across (left to right) and 3 down, although I don't care how many
> down it goes. I can control that search amount, that is easy
> enough. I have
> no idea how to begin. Would I create 2 search lists?
See the [table_organize] tag or check this out, thanks to David Bordas. It
produces 5 items per row, based on this part of the code:
if(($table_cell % 5) == 0)
This is working code, however, I am using two distinct databases. It may not
be the speediest, but it works great. YMMV
Good luck!
Curt Hauge
<!-- BEGIN CONTENT -->
[perl failure="Perl code error <BR>"]
my $table_cell=0;
return ("");
[/perl]
[search-region]
[search-list]
<table cellspacing="10" cellpadding="10">
<tr><td> </td>
[loop search="fi=prog/sf=category/se=[item-data package
cat]/ml=9999/tf=title"]
[perl failure="Perl code error <BR>"]
if(($table_cell % 5) == 0)
{
return("</tr><tr>\n");
}
[/perl]
<td>[if-loop-data prog image]<img src="prog/[loop-data prog
image]"><br>[/if-loop-data]<font size=-1>[loop-data prog title]</font></td>
[perl failure="Perl code error <BR>"]
$table_cell++;
return ("");
[/perl]
[/loop]
[/search-list]
<td> </td></tr>
</table>
[/search-region]
<!-- END CONTENT -->
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users