How to show only first image only on albumList.php?

4 posts by 3 authors in: Forums > CMS Builder
Last Post: December 14, 2011   (RSS)

Re: [jacgo] How to show only first image only on albumList.php?

By Jason - December 14, 2011

Hi Jacgo,

You can use a break right after your output a thumbnail like this:

<td height="70" valign="top">
<?php foreach ($record['photos'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
<?php break; ?>
<?php endif ?>
<?php endforeach ?>
</td>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] How to show only first image only on albumList.php?

By jacgo - December 14, 2011

Hi Jason

It's looks great!

other issue:

How can I post my code on forum like yours? (code formating)
Your code looks clear.
it's help everyone to look it.

Thanks for your help.



Jacgo

Re: [jacgo] How to show only first image only on albumList.php?

By robin - December 14, 2011

Hey Jacgo,

There are buttons under the reply text box that you can use to add tags to your post. If you use the code tags, everything between the open code tag and close code tag will be nicely formatted.

A list of all the tags you can use is here:
http://www.interactivetools.com/forum/gforum.cgi?do=markup_help;

Hope that helps,
Robin
Robin
Programmer
interactivetools.com