Identify first upload in multiple upload field

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 9, 2009   (RSS)

By bruno - February 9, 2009

I was wondering if there was a way to identify each image in a multiple upload image field. I'm trying to isolate the link to the first upload. The code I currently have links to each image within the foreach loop.
Heres my viewer code

<?php

require_once "/Documents/design/Brunello-Redesign/dev/cmsAdmin/lib/viewer_functions.php";

list($print_portfolioRecords, $print_portfolioMetaData) = getRecords(array(
'tableName' => 'print_portfolio',
));



and my foreach loop for the images:

<?php foreach ($record['main_image'] as $upload): ?>


<a href="<?php echo $upload['urlPath'] ?><img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" />


<?php endforeach ?>

Re: [bruno] Identify first upload in multiple upload field

By bruno - February 9, 2009

Hey Dave,

That seems to work but now I have another CMS Builder/lightbox related problem. I will start a new thread for this.


Thanks!

Niki