Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Displaying list view in columns

 

 


_kate_
User


Jun 8, 2008, 5:26 AM

Post #1 of 3 (317 views)
Shortcut
Displaying list view in columns Can't Post

I am trying to get the data from the List view page to display in a table in 2 columns - I tried some of the codes in some of the other threads however I couldn't get these to work.

Any help is appreciated :)


Dave
Staff / Moderator


Jun 9, 2008, 11:27 AM

Post #2 of 3 (301 views)
Shortcut
Re: [AgentBristow] Displaying list view in columns [In reply to] Can't Post

No problem. The trick with any kind of design you want to create is to first create a mockup, then to figure out what the pattern is.

Try this code. It will output a </tr><tr> after every 2 <td>...</td> lines:


Code
<table border="1">  
<tr>

<?php foreach ($records as $record): ?>
<td>
<?php echo $record['title'] ?><br/>
</td>

<?php $maxCols=2; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?>
<?php endforeach; ?>

</tr>
</table>


Note that you should use your own variable names instead of $record, etc but that the line in red can stay the same.

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com


_kate_
User


Jun 23, 2008, 11:14 AM

Post #3 of 3 (248 views)
Shortcut
Re: [Dave] Displaying list view in columns [In reply to] Can't Post

Worked perfectly! Thanks! :)

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4