Columns of information...

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

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

Re: [HDLLC] Columns of information...

By Dave - August 20, 2008

Hi Jeff,

The way to do this is to figure it out on a plain html page and then add it to the CMS generated page. It will take a little bit of research and google searches. Here's a method I recall off the top of my head - this code may not be exact.

First give your big image an id such as
<img src= ... id="bigimage" />

Then on your little images have this:
<img src .... onclick="document.images.bigimage.src = 'url to big version of thumbnail'" />

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