Columns of information...

5 posts by 3 authors in: Forums > CMS Builder
Last Post: August 20, 2008   (RSS)

By HDLLC - August 18, 2008

Hi there-

Okay... I've figured out how to make the listing of items page show the results in 2 columns (or even 3, or more) thanks to these forums.

I seem to be having trouble applying that same principle to the details pages.

I have a page where I want to show some images in the right half of the web page, showing the thumbnails in 2 columns on that half of the page, going down the page from top to bottom.

I could create this using 10 separate fields, which I may do if I cannot figure this out - or I figured I'd learn something new and see if I can show these results in two columns within the details page.

I've attached a screen shot of the center section of my page. I want to have the details page show the 10 images from table "image_1" in those slots at right.

Any help is greatly appreciated!

Thanks in advance!

--Jeff
Attachments:

picture-2.gif 113K

Re: [HDLLC] Columns of information...

By Jake - August 19, 2008

Hi Jeff,

Thanks for posting!

Here's some example code you could use to set this up:

<table>
<tr>

<?php foreach ($exampleRecord['image'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<td>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" />
</td>
<?php $maxCols=2; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>

</tr>
</table>


What that code does is set up a table, where for every second image a new table row is inserted.

Let us know if you have any other questions about this. [:)]
-----------------------------------------------------------
Cheers,
Jake Marvin - 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.

Re: [Jake] Columns of information...

By HDLLC - August 19, 2008

Thanks!

Much appreciated!

--Jeff

Re: [Jake] Columns of information...

By HDLLC - August 19, 2008

Okay... You game to try this one step deeper?

On that image I posted - is there a way to add a little script that when a person clicks on the thumbnails at the right, they show in the big slot on the left? Instead of having them pop in a new window or link - it would be great to just have them replace in that bigger slot.

Any ideas that way?

Thanks!

--Jeff