 | |  |
 |

Cliff
Staff

Jul 6, 2005, 10:26 AM
Post #1 of 2
(6135 views)
Shortcut
|
Tutorial : Search results in multiple columns
|
|
|
Hi everyone! I recently setup the search results template to list it's results in two columns for a Priority Consulting project using some old Javascript that I found floating around on the forum. Since I can't seem to find it again, thought that I would post this to the forum so that you can try it out. It's really easy to setup, and if you follow the steps below they will walk you through how to get things going. 1. Add the following counter code somewhere in the <head> tags of the _search_results.html template:
<head> <script language="JavaScript" type="text/javascript"> <!-- var count = 0; --> </script> </head> 2. Move your template insert tag into a table, like this:
<table width="80%" align="center"> <!-- template insert : $list$ --> </table> 3. At the beginning of each template cell, add the following Javascript:
<script> if (count % 2 == 0) { document.write("</tr><tr>"); } count++; </script> The count % 2 == 0 controls the number of column that will be output. You can adjust that to any number you like. Make sure you do this for each templatecell on the page. 4. Then have the rest of the details of the listing in a table column, so the whole template cell looks like this:
<!-- templatecell : row_image --> <script> if (count % 2 == 0) { document.write("</tr><tr>"); } count++; </script> <td valign=top align=center width=115> <!--THE DETAILS OF YOUR LISTING--> </td> <!-- /templatecell : row_image --> And that is pretty much it! Feel free to used the attached template as a reference point if you would like, and if you need any more details about how this works just let me know. Regards, Cliff Stefanuk - Customer Service Manager support@interactivetools.com
(This post was edited by Cliff on Jul 6, 2005, 10:28 AM)
|
|
Attachments:
|
_search_results.html
(4.84 KB)
|
|
|  |
 |

ross
Staff
/ Moderator

Jan 24, 2007, 2:29 PM
Post #2 of 2
(2750 views)
Shortcut
|
Re: [Cliff] Tutorial : Search results in multiple columns
[In reply to]
|
|
|
Hi there Thanks for posting! Cliff actually setup a great tutorial for having your listings appear in two columns. Check it out here: http://www.interactivetools.com/forum/gforum.cgi?post=41018;search_string=column;t=search_engine#41018 His example is actually done with the search results template but the technique would be exactly the same. Have a look and let me know what you think . ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
|