27 posts by 4 authors in: Forums > CMS Builder
Last Post: October 21, 2008   (RSS)

Ok, starting with the first page (photos2.htm) create a list of records with all the photos and fields you want displaying. Next, put them in a table like this (start with border=1 for debugging):

<table border="1">
<tr>

<?php foreach ($yourVariableName as $record): ?>
<td>
... insert code to show your fields and uploads here ...
</td>
<?php endforeach; ?>

</tr>
</table>


And that will show them all in a horizontal table.

Hope that helps, let me know how it goes.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Products pages - "list" page results setup horizontally

Hi again, Dave!

I started dropping php code into the html mock up of that we've talked about & I'm getting some error messages. I wanted you to review them before I progress any further. There's obviously something I'm not understanding here...

I've uploaded photos & created a record with CMS Builder. Then changed the html mock up to a php file & added the code snippet about the header. Then I dropped in my Event Title & Event Description php code snippets.. This is what I've got:

Thanks again for all your time,
.james.

http://hamburgermarys-orlando.com/photos2.php
No problem, can you attach the photos2.php file to this post?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Products pages - "list" page results setup horizontally

There ya go... [:)]
Attachments:

photos2.php 12K

Hi James,

I didn't see any errors in the attached file or on the page anymore?

What you want to do is start with the code from the code generator that displays images and then copy and paste the tags so they repeat that table cell in your code where you want the images to appear.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Products pages - "list" page results setup horizontally

Hey again Dave!

Okay... I've got the main photos page functioning correctly & I'm ready to drop in the PHP snippet you noted above that will display my thumbnails in 3-column tr fashion. However, I'm confused about where to place the code: <?php $maxCols=3; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?> within my existing code.

Could you take a look and advise?

Thanks!

http://hamburgermarys-orlando.com/photos2.php