Photo gallery thumbnail on index page

9 posts by 6 authors in: Forums > CMS Builder
Last Post: January 26, 2010   (RSS)

Hi, there.

I have a site that uses CMSB with Lightbox 2.0. You can see the index page here: http://www.joyoftravel.ca/picture.php.

I'd like the first thumbnail from each gallery to appear next to the title of that gallery. When I try to do this, it shows all of the thumbnails for the gallery, but I obviously only want the first one to show up.

Can someone advise how this can be done, please?

Cheers,
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] Photo gallery thumbnail on index page

Hi Nigel

I have the exact same problem and have yet to find a solution.

If anyone can help solve this it would be great!
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [gkornbluth] Photo gallery thumbnail on index page

Hi, Jerry.

Thanks for your suggestion. I did think of that, but was hoping there was a easier solution (from the client/end user's point of view)
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] Photo gallery thumbnail on index page

By flamerz - January 23, 2010

i tryed with:

<?php if ($record['uploads'][0]['hasThumbnail']): ?>
<img src="<?php echo $record['uploads'][0]['thumbUrlPath'] ?>" width="<?php echo $record['uploads'][0]['thumbWidth'] ?>" height="<?php echo $record['uploads'][0]['thumbHeight'] ?>" alt="" /><br/>
<?php endif ?>


just insert this inside your main foreach listingRecords.

i hope this works.

Re: [flamerz] Photo gallery thumbnail on index page

Perfect! I'm actually using it on a prototype for another site, and it does exactly what I need: http://66.7.208.127/~harolda1/newsPhotos.php

Thank you so much.
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] Photo gallery thumbnail on index page

By Donna - January 25, 2010

I do this exact thing on one of my sites -- I just use a break to tell it to stop after the first thumbnail. Here's what my code looks like:

<?php if ($upload['hasThumbnail']): ?>
<a href="<?php echo $record['_link'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" /></a>
<?php break; ?>
<?php endif ?>


Hope this helps. :)
Donna

--
support@interactivetools.com

Re: [Donna] Photo gallery thumbnail on index page

Thanks, Donna.
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [Donna] Photo gallery thumbnail on index page

By Codee - January 26, 2010

Perfect. That's what I've been using for clients for about a year. It saves them a stop while creating/modifying records and they can drag/drop the order of uploaded gallery images to ensure the first one is the desired one...and able to change by drag/drop as opposed to removing/reuploading into a separate field.