Little Help with Images

8 posts by 2 authors in: Forums > CMS Builder
Last Post: May 12, 2008   (RSS)

By dparrott - May 9, 2008

Hello, I'm needing a little help with images.
I'm trying to understand how they work. Here is my understanding (which may be totally off base):
To have images on my site I upload them, both a smaller thumbnail and larger image of the same.
If that is the case how do I get it so that on the detail (or single item page) the user can click on the thumbnail to see the larger image?
Can this work with multiple images on the same detail page?

thanks
dale

Re: [Dave] Little Help with Images

By dparrott - May 12, 2008

That did the trick Dave thank you very much. Is there a way I can get multiple thumbnail images to display in a row rather than one above the other?

Re: [dparrott] Little Help with Images

By dparrott - May 12, 2008

Nevermind Dave. I found an offending <br> in there... sorry.
thanks for the help

Re: [dparrott] Little Help with Images

By Dave - May 12, 2008

I just about to post too, but you beat me to it. Glad you figured it out! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Little Help with Images

By dparrott - May 12, 2008

Things are going pretty well Dave, but I need a little help with the images on my List page. The page currently pulls in all thumbnails for a product and I want it only to pull one in. Here is the code that I have

<?php // foreach (getUploads($options['tableName'], 'images', $record['num']) as $upload): ?>
<?php $upload = getUploads($options['tableName'], 'images', $record['num']); ?>
<a href="<?php echo $record['_link'] ?>">
<img src="<?php echo $upload['thumbUrlPath'] ?>"
width="<?php echo $upload['thumbWidth'] ?>"
height="<?php echo $upload['thumbHeight'] ?>"
alt="" /></a>

<?php // endforeach ?>


I took the foreach statement out, but that didnt' seem to help.

does this make sense?

thanks
dale

Re: [dparrott] Little Help with Images

By Dave - May 12, 2008

Using the foreach just add this tag before the "endforeach", like this:

<?php break; ?>
<?php endforeach; ?>


"break" just means "stop looping over images". That should show 1 and then stop.

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

Re: [Dave] Little Help with Images

By dparrott - May 12, 2008

Thanks Dave.
You Rule!

dale