Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Instant Website: Realty/Listings/Auto:
2 Challenges with displaying listings....

 

 


millertrey
New User

Apr 27, 2009, 11:48 AM

Post #1 of 2 (1070 views)
Shortcut
2 Challenges with displaying listings.... Can't Post

Challenge #1: Hi, I am trying to incorporate IRW in my client's website, but he wants the listings to display in a 3 x 3 table (9 listings per page) instead of the "list view" that is in the Simple template.

Here is a link to what I'd like the page to look like:

http://www.triopropertymgt.com/properties_listing.php

Challenge #2: For searching, I'd like to hard code a link into a map of counties, so that when they click on a particular county, all the listings in that county are displayed. Any ideas on how to hard code something like that? I have a "county" field that will be populated with the county data.

THANKS IN ADVANCE FOR YOUR HELP!!!!!


ross
Staff / Moderator


Apr 27, 2009, 2:34 PM

Post #2 of 2 (1067 views)
Shortcut
Re: [millertrey] 2 Challenges with displaying listings.... [In reply to] Can't Post

Hi there.

Thanks for posting this to the forum :).

I think the best way to get this all done is one at a time so lets start with the 3 x 3 column.

The first step there is to get it displaying the default way (one single column). but using all your formatting and everything. So basically, pretend that you only want to have one column of listings for now.

Once you get that going, check out this code:


Code
<table> 
<?php foreach ($parent_categoriesRecords as $record): ?>
<td>
display something here
</td>
<?php $maxCols=3; if (@++$count % $maxCols == 0): ?>
</tr>
<tr>
<?php endif ?>
<?php endforeach ?>
</table>


What I've done there is put a <table> around the whole foreach loop and it loads each record into a table cell (td). Then there is that little maxCols=3 part which checks when you need to create a new table row.

Does that make sense? 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: http://www.interactivetools.com/consulting/